What is String ? Give an Example

String is an array of characters. Character can store only one character , String is used to store sequence of characters. Such as names, address etc. For printing string format spacifier is %s.  String is  automatically terminated by null character ‘’.

Example :

        Declaration of string

char name[]=”Coding Street “;

char name[7]={‘C’,’o’,’d’,’I’,’n’,g’,’’};

char name[20]=”CodingStreet”;

%d bloggers like this: