How to escape the % sign in C's printf? -
How do you avoid% while using printf
in C?
printf ("hello \%"); / * Do not like it * /
You saved it by posting the double '%' Use this example: %%
Use your example:
printf ("hello %%");
The escape sign of '%' is for printf only if you do:
four [5]; Strapepi (A, "%%"); Printf ("This is the value of one:% s \ n", a);
It will print: This is the value of one: %%
Comments
Post a Comment