0

Explain the code wizards 0ls

Output is 0

11th Jun 2020, 3:23 PM
Ajith
Ajith - avatar
3 Answers
+ 2
C is -2 and B is assigned the negative of C so it will hold an absolute value of 2. A is assigned the negative of B (and B is 2) so A becomes -2. A + B = (-2 + -(-2)) = (-2 + 2) = 0
13th Jun 2020, 12:09 AM
Gen2oo
Gen2oo - avatar
0
#include<stdio.h> #define A (-B) #define B (-C) #define C (-2) int main() { printf("%d",A+B); return 0; }
11th Jun 2020, 3:25 PM
Ajith
Ajith - avatar
0
Simple logic am not getting it
11th Jun 2020, 3:26 PM
Ajith
Ajith - avatar