Re: printing % with printf(), use of \ (escape) character

teachtiro_at_yahoo.com
Date: 02/11/05


Date: 11 Feb 2005 02:27:18 -0800

i got it through the below explanation

Eric:
"Here's the fact you seem to be overlooking: printf() doesn't
> see the format string until after the compiler has processed it. "

thank u



Relevant Pages

  • Re: x86 Stack Confusion
    ... There is nothing analogous to printf() with it's ... > compiler to generate code based on the actual argument types. ... > the design decisions that went into C. C implements its I/O functions ... the format string, and uses the full printf where needed. ...
    (comp.lang.c)
  • Re: some "newbie" questions
    ... >> since the compiler knows nothing about what the format specifiers ... > gcc does, ... > printf, since the standardreferto it. ... # type-checked against a format string. ...
    (comp.lang.c)
  • Re: How does the compiler do with this code?
    ... int printf(const char * restrict format, ... to assume the first argument is a format string. ... might, depending on the compiler, allow the compiler to catch ... prototype, then the arguments are passed as is to the printf ...
    (comp.os.linux.development.apps)
  • Re: puzzle in C
    ... printf() the format string "%d, a+b" but you didn't give it a value to ... Since your format string includes %d the printffunction ... Arguments to functions are conventionally passed on the stack. ... differently depending on your compiler, ...
    (comp.lang.c)
  • Re: printing % with printf(), use of (escape) character
    ... "Here's the fact you seem to be overlooking: printf() doesn't ... > see the format string until after the compiler has processed it. ...
    (comp.lang.c)