0
Why the output of second sqr(3+1) is 7?
#define sqr(i) i*i int main() { printf("%d %d ",sqr(3),sqr(3+1)); }
2 ответов
+ 2
Note sqr() is i*i, not (i)*(i)
sqr(3) -> 3*3
sqr(3+1) -> 3+1*3+1 -> 3+3+1 -> 7
0
Thank you👍
#define sqr(i) i*i int main() { printf("%d %d ",sqr(3),sqr(3+1)); }