Important MCQ

Which data type is best for the value 'Z'?

Q.Which data type is best for the value 'Z'?

A) char
B) float
C) bool
D) int
Correct Answer:
Option A
Detailed Explanation:
A) char 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().