A string is a series of characters treated as a unit. In C, strings are represented by a series of characters terminated by the null character, which is the character whose ASCII code is 0. Strings can be stored in character arrays. An array is a series of items, or elements, all of the same type. To declare an array called name and having 30 elements of type char, do the following:
Be sure to allot a number of elements sufficient to hold the entire string, including the null character.
String constants are represented by enclosing the string in double quotes: "This is an example of a string".
The strlen() function can be used to find the length of a string (not counting the terminating null character). The scanf() function, ...