Q. In a 32-bit compiler, which 2 types have same size?
β
Correct Answer: (D)
int and float
Explanation:
In a 32-bit compiler, the typical sizes of fundamental data types are:
- int and float both take 4 bytes in a 32-bit compiler.
- double is 8 bytes, so option (A) is incorrect.
- short is 2 bytes while int is 4 bytes, so (B) is incorrect.
- char is 1 byte, while short is 2 bytes, so (C) is incorrect.
Final Answer:
β (D) int and float