+ 4
#include <stdio.h> #define sqr(x) x*x int main() { printf("%d",sqr(3+1)); return 0; }
Can any one explain this C program?
2 ответов
+ 18
Output: 7
Here's how:
#define sqr(x) x*x
Here value of x = (3+1) the thing we are passing on sqrt() as parameters.
x = 3+1
So it will executed like this:
x*x
3+1*3+1
3+3+1 //using operator precedence..
7
I hope u understand
Happy Coding 💕💕
+ 1
Thank you