I implemented a squaring define directive as this :
#include <stdio.h>
#define SQR(y) ((y)*(y))
int main() {
int a;
printf("Enter : ");
scanf("%d",&a);
a = SQR(a);
printf("The square is: %d\n",SQR(a));
return 0;
}
But when I execute it, I don't get any error, but it is giving wrong answer every time.
Why is it giving 4th power instead of second power of input?