0
Why output is 28 pls explain guys
5 ответов
+ 3
Macro substitution is simple text replacement before it compiles.
(28/square(4))
Replace square(4) with 4*4:
(28/4*4)
Now reduce according to order of operations (left to right in this case):
(7*4)
(28)
Proper macro definition would fix it:
#define square(x) ((x)*(x))
+ 1
Brian, that is correct. Thanks for the explanation
+ 1
thanks for explanation🙏🙏
0
I'm no expert in C but it gives the expected result (1) when you enclose square(4) in parentheses; (square(4))
0
David Akhihiero your right but how it evaluate in this case bro without parentheses