OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: % stdout?

From: Andreas Kahari (andreas.kaharigmail.com)
Date: Thu Nov 09 2006 - 10:49:20 CST


Have a look in your C code book. The you will need to printf "%%" to get a '%'.

Andreas

On 09/11/06, Cassio B. Caporal <cassioostec.com.br> 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,
>
>

--
Andreas Kahari
Somewhere in the general Cambridge area, UK