Important MCQ

int a = 2; a *= 3 + 1; now a is

Q.int a = 2; a *= 3 + 1; now a is

A) 7
B) 6
C) 8
D) 5
Correct Answer:
Option C
Detailed Explanation:
C) 8 is correct. Apply the relevant C++ rules: integer versus floating-point division, remainder, operator precedence, loop execution, ternary selection, data types, and the syntax of main().