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: Steffen Wendzel (cdp_xegmx.net)
Date: Thu Nov 09 2006 - 11:19:23 CST


On Thu, 09 Nov 2006 14:37:33 -0200 "Cassio B. Caporal" <cassioostec.com.br> wrote:

: Hey,

Hi,

:
: I have problems to print '%' in stdout... Suppose code below:
:
: #include <stdio.h>
:
: main() {

your main should be of type 'int'.

: char foo[] = "bar=30%\n";
: fprintf(stdout, bar);

You mean "fprintf(stdout, foo);" ?

: }
:
: How can I solve this? Thanks,

If you want to print a '%', you need to use '%%' in your array.

--steffen

--
website: http://cdp.doomed-reality.org
hardened linux: http://drlinux.doomed-reality.org