How the answer is 10? Please explained | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5
10th Mar 2019, 8:05 AM
Sandeep
Sandeep - avatar
1 Answer
+ 7
When precompiler process prod it will expand the expression in: 3+2*4-1 than result in 3+8-1=10 because multiplication has precedence respect addition/subtraction... For solve, define prod like #define prod(i,j) (i)*(j) So the expression will be expanded to: (3+2)*(4-1)=5*3=15
10th Mar 2019, 8:30 AM
KrOW
KrOW - avatar