Example & Tutorial understanding programming in easy ways.

What is the difference between %c and %s in C language?

%c - it is used for the only one character.


%s - It is used for the string(collection of char)


program:


void main()

{

char ch='A';

char str[]="Mystring";

printf("%c",ch);

printf("%s",str);
}


output:

A

Mystring

Read More →
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!