you forgot to add ‘\0’ char in zero terminated char array, after you replaced value with index 2.
More Related Contents:
- The array index doesnt show the character [closed]
- How to get the real and total length of char * (char array)?
- How to convert a char array to a string?
- can’t modify char* – Memory access violation
- C / C++ How to copy a multidimensional char array without nested loops?
- Concatenate char arrays in C++
- Find the Biggest Number in C, BUT with characters
- How can I get out of the loop and continue the loop again?
- How do I take values from text file and input into a 2D array? c++
- How do I use arrays in C++?
- Return array in a function
- Is a string literal in С++ created in static memory?
- Are arrays Pointers? [duplicate]
- Array index out of bound behavior
- I don’t want my Excel Add-In to return an array (instead I need a UDF to change other cells)
- Determine the size of a C++ array programmatically?
- Why doesn’t C++ support functions returning arrays?
- How do I pass a reference to a two-dimensional array to a function?
- Why can’t we pass arrays to function by value?
- What is the purpose of allocating a specific amount of memory for arrays in C++?
- How to construct std::array object with initializer list? [duplicate]
- How do you dynamically allocate a matrix?
- Is it possible to initialize std::vector over already allocated memory?
- array vs vector vs list
- Casting pointer to Array (int* to int[2])
- treating memory returned by operator new(sizeof(T) * N) as an array
- C++ N nested vectors at runtime
- C++ 2 dimensional array with variable size rows
- Why do we even need the “delete[]” operator?
- Why can’t I move std::ofstream?