0

Can someone explain the code?It's from C challenge.

#define prod(i,j) i*j int main(){ int x=3,y=4; printf("%d",prod(x+2,y-1)); return 0; } Output is:10

1st Sep 2019, 4:25 PM
Sobiya Moulvi
Sobiya Moulvi - avatar
2 Respuestas
+ 7
i think it's this: ->prod(x + 2, y - 1) ->x + 2 * y - 1 ->3 + 2 * 4 - 1 ->3 + 8 - 1 ->10
1st Sep 2019, 4:28 PM
Anton Böhler
Anton Böhler - avatar
+ 1
Thanks!....Anton Böhler
1st Sep 2019, 4:31 PM
Sobiya Moulvi
Sobiya Moulvi - avatar