
StringA string in C is actually a character array. As an individual character variable can store only one character, we need an array of characters to store strings. Thus, in C string is stored in an array of characters. Each character in a string occupies one location in an array. The null character ‘ ’ is put after the last character. This is done so that program can tell when the end of the string has been reached.
For example, the string “Hello” is stored as follows.Since the string contains 5 characters. it requires a character array of size 6 to store it. the last character in a string is always a NULL(‘