#define A 10+10
main ()
{
int a; a=A*A;
printf (%d, a);
}
the above code is replaced as follow due to macro:
#define A 10+10 search templet A & replace it 10+10*10+10
main ()
{
int a; a= 10+10*10+10;
printf (%d, a);
}
precedence of * is higher then Binary + and associativity if left to right.
so step1) 10+10*10+10
step20)10+100+10
step3) 110+10
step4) 120
so the value of a is 120.