2. String
• A String is an array of characters terminated
by a special symbol named as null character
(represented as ‘0’ )
• Null character is also named as string-
termination character and used to identify
the length of the string.
• Logical illustration of a string consisting of n
characters:
X[0] X[1] X[2] … … … X[n-1] ‘0’
3. Defining a String
char string_name[expression];
• string_name user chosen name for the
string
• expression integer expression indicates
the number of elements in the string,
including the null character
Sample Code:
char name[50];