Important MCQ

A bool variable can hold

Q.A bool variable can hold

A) decimals only
B) text
C) any integer
D) true or false
Correct Answer:
Option D
Detailed Explanation:
D) true or false is correct. Data types define what a variable stores. int stores whole numbers, float/double store decimals, char stores one character, bool stores true/false, and sizeof reports size in bytes.