pre-processor string replacement



Hi Everyone,

I have the following question regarding string replacement
pre-processor statement,

#define status "23"
#define status "44"

int main()
{
printf("%s\n", status);
}

this works fine and prints 44

where as

#define status "23"
#define status1 status

int main()
{
printf("%s\n", status);
}

prints 23, string replacement occurs on the pre-processor statement
itself, which is not in case 1, why is it so?
Can anyone help me on this?

.



Relevant Pages

  • Re: pre-processor string replacement
    ... I have the following question regarding string replacement ... int main ... rjh at the above domain, ...
    (comp.lang.c)
  • Re: pre-processor string replacement
    ... I have the following question regarding string replacement ... int main ... string replacement occurs on the pre-processor statement ... Ian Collins. ...
    (comp.lang.c)