Hi,
I was just going through certain code's which are frequently asked in Interview's. I came up with certain doubts, if anyone can help me regarding this? I am totally confused on this now,
#include<stdio.h>
#include<conio.h>
#define square(x) x*x
main()
{
int i,j;
i=4/square(4);
j=64/square(4);
printf("\n %d",i);
printf("\n %d",j);
printf("\n %d",square(4));
getch();
}
Output is :
4
64
16
I am wondering, why did square(4)
return 1 when i divided it? i mean how can i get the value 4 and 64 when i divide it but when used directly i get 16!!?