Why output is 28 pls explain guys | Sololearn: Learn to code for FREE!


Why output is 28 pls explain guys



10/17/2021 5:06:33 AM

Lathesh poojary

5 Answers

New Answer


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))


Brian, that is correct. Thanks for the explanation


thanks for explanation🙏🙏


I'm no expert in C but it gives the expected result (1) when you enclose square(4) in parentheses; (square(4))


David Akhihiero your right but how it evaluate in this case bro without parentheses