Important MCQ

Which variable declaration is invalid?

Q.Which variable declaration is invalid?

A) int _lives;
B) int 9lives;
C) int Lives;
D) int lives9;
Correct Answer:
Option B
Detailed Explanation:
B) int 9lives; is correct. C++ declarations use the data type before the variable name. Integer division drops the fractional part, character codes can be converted to integers, and constants cannot be changed.