Multiple choice technology programming languages

What will be the answer of a,b,c,d after the following statement? a = 2 b = 3 c = 4 d = a + + b + + + c

  1. a=2, b=3, c=4, d=9

  2. a=3, b=5,c=4, d=9

  3. a=3, b=4,c=4, d=11

  4. Error

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

The expression a + + b + + + c is parsed as a + (+b) + (+(+c)). Since unary plus operators do not modify the variables, it evaluates to 2 + 3 + 4 = 9. The variables a, b, and c remain unchanged.