Code:
#include<stdio.h>
#define SQR(A) A*A

main()
{
 int x=5,y;
 y=4*SQR(x-3);
printf("%d",y);
}
Here output is 2.
But I am not able to understand why the output becomes 2 ?
In our stdy book we dont get enough dicussion in this preprocessor topic. But I know that ntire macro expression should be enclosed with in paranthesis.So defining #define SQR(A) A*A is wrong it should be like this #define SQR(A) (A*A).I have no clear idea when we wrongly define #define SQR(A) A*A and I think it will not work at all and then i think the output of the above programme is 4.
Help me to understand the code and why output is 2. Give some link on preprocessor to get clear idea about it.