Multiple choice technology web technology

What is the output ? #define sum(x,y) x+y main() { int i=10, j=20; i=j*sum(i,j)*i; printf("%d", i); }

  1. 6000

  2. 400

  3. 10

  4. Compilation error-Functions can not be defined as macro

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The preprocessor replaces the macro sum(i,j) textually with i+j without parentheses. The expression becomes i = j * i + j * i. Because multiplication has higher precedence than addition, this evaluates to (20 * 10) + (20 * 10), which simplifies to 200 + 200 = 400.