Hi I am currently reading characters into an array which I set the size as 50...but I am doing it from input so the characters inputted may not always be 50..so when I do the for loop to display each character how do I get the size of the input so I do not display the entire array and just display what was inputed. Thanks alot for the help
NULL is an implementation-defined macro for a null pointer constant, it is not meant to be used as a null character. Although it may 'work out in the end' it is not what you should be doing and not what you should encouraging others to do.
Theoretically a compiler manufacturer could now define NULL to be nullptr (unlikely as to many people misuse NULL)
Always end a character string with a zero (0). If you enter character into a string through your keyboard when you press enter the last character will be zero. Therefor a character string is defined as szString. s stand for string and z stand for terminated by zero. Unsigned character strings normally do not get terminated by a zero because a zero is a valid unsigned character.
Zero = 0. Not ascii '0'.