0
How this output equal to 7
#include<stdio.h> #define sqrt(x) x*x int main(){ printf("%d",sqrt(3+1)) }
2 Antworten
+ 1
Hey!!
You've given the value of x =(3+1), here (3+1) is not equal to 4, so... Value of x is (3+1) not be 4, so.. (3+1) * (3+1) = 7, becoz according to precedence table it is working on right to left, so the program should be execute (*) first, 3+1 * 3+1 = 3+3+1=7.. as simple is that..
0
Thanks all, I got the answer