![]() |
![]() |
![]() |
![]() |
![]() |
|
The c, s, and % print specifications are for
characters, strings, and the insertion of percent signs.
Display character, percent sign, and string:
printf ("The character %c occupies 25%% of the string %s.\n",
'a', "abcd");
--- Result ---
The character a occupies 25% of the string abcd.