The output of
printf("%%%%%%%%");
is
%%%%
I printed %
8 times, why does the output only have 4 %
?
Because %
is a format specifier escape sequence (as in %d
would print an int
).
To get the program to print the actual symbol, you write %%
. Same goes for \
. (Although fundamentally different, you still need two to print one)
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments