Ramblings of a techie
Showing posts with label
printf
.
Show all posts
Showing posts with label
printf
.
Show all posts
20 December 2010
Print % using printf in C
Problem:
How can you print % using the printf function? (Remember % is used as a format specifier!!!)
Very Simple, following cases are examples
Cheers!!
Jack
C - %n format specifier in printf
Well, what does the format specifier %n of printf function do?
Explanation:
Print nothing, but write number of characters successfully written so far into an integer pointer parameter.
Example:
Output:
blah blah
val = 38
Cheers!
Jack
Older Posts
Home
Subscribe to:
Posts (Atom)