| Author |
question to printf()
|
|
| arsenic 2007-11-21, 1:25 pm |
| this sounds like a verry stupid question but google could not give an
answer..
who can i print '%' with printf() in C ?
It does not work with \% .
thx and regards
| |
| Johannes Bauer 2007-11-21, 1:25 pm |
| arsenic schrieb:
> this sounds like a verry stupid question but google could not give an
> answer..
> who can i print '%' with printf() in C ?
> It does not work with \% .
%%
Greetings,
Johannes
--
"Viele der Theorien der Mathematiker sind falsch und klar
Gotteslästerlich. Ich vermute, dass diese falschen Theorien genau
deshalb so geliebt werden." -- Prophet und Visionär Hans Joss aka
HJP in de.sci.mathematik <4740ad67$0$3811$5402220f@news.sunrise.ch>
| |
| Eric Sosman 2007-11-21, 1:25 pm |
| arsenic wrote On 11/21/07 13:42,:
> this sounds like a verry stupid question but google could not give an
> answer..
> who can i print '%' with printf() in C ?
> It does not work with \% .
printf ("I am 100%c sure this will work.\n", '%');
printf ("... but I am 100%% sure this is better.\n");
--
Eric.Sosman@sun.com
| |
| arsenic 2007-11-22, 7:22 pm |
| i solved the problem.
it only printf the '%' in printf("\% ") if i add an \n else the buffer
does not get flushed....
|
|
|
|