first all the preprocessor statementa are executed where all A's are replace
by B
now the code looks like
#include<stdio.h>
int main(){
int B =4;

#define A B
#define B B
printf("%d",B);
return 0;
}

after words second preprocessor statement get executed and all B's by B get
replaced
#include<stdio.h>
int main(){
int B =4;

#define B B
#define B B
printf("%d",B);
return 0;
}
On Fri, Sep 10, 2010 at 4:25 PM, saurabh agrawal <[email protected]>wrote:

> Thanks a lot umesh...but still i am in confusion that:
>
> after first processing : "A is replaced by B"
> after second proecessing " B is replaced by A"
> then why again this A is not being replaced by #define A macro..
> why it is not going in an infinite loop...because i think there is no
> fiexed order of execution of the macro..
> even if you change the order in which macros are defined will make no
> effect...
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<algogeeks%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to