Important MCQ

Output of cout << 10 / 4.0; is

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

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