I have a char array buffer that I am using to store characters that the user will input one by one. My code below works but has a few glitches that I can\'t figure out:
You have to end the string with a \0 character. That's why they are called zero terminated strings.
It is also wise to allocate 1 extra char to hold the \0.