Yes, but I read lines from a file.. I wrote a function that add one more '%' and works fine. Thanks!
Jason Dixon wrote: > On Nov 9, 2006, at 11:37 AM, Cassio B. Caporal wrote: > >> Hey, >> >> I have problems to print '%' in stdout... Suppose code below: >> >> #include <stdio.h> >> >> main() { >> char foo[] = "bar=30%\n"; >> fprintf(stdout, bar); >> } >> >> OpenBSD returns : bar=30 >> Linux returns : bar=30% >> >> How can I solve this? Thanks, > > $ cat foo.c > #include <stdio.h> > > main() { > char foo[] = "bar=30%%\n"; > fprintf(stdout, foo); > } > $ gcc foo.c -o foo > $ ./foo > bar=30% > > > -- > Jason Dixon > DixonGroup Consulting > http://www.dixongroup.net