Important MCQ

Output of cout << 10 / 4; is

Q.Output of cout << 10 / 4; is

A) 3
B) 2
C) 2.5
D) 4
Correct Answer:
Option B
Detailed Explanation:
B) 2 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().