Differences between string constant and character constant

Here differences between string constant and character constant.
String Constant is enclosed in double quotes ( " ) and character constant is enclosed in apostrophes ( ' ). Character constant has an equivalent integer value whereas string constant does have equivalent integer value.

Examples: 
char str[]="Programming";    //string constant is programming
char str[]="Programmingside";//string constant is programmingside
char ch= 'c';                //character constant is c
char letter='t'              //character constant is t;
 

Popular posts from this blog