Important MCQ

int x = 7.9; stores

Q.int x = 7.9; stores

A) 7.9
B) 8
C) nothing (error)
D) 7
Correct Answer:
Option D
Detailed Explanation:
D) 7 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.