Q. In a 32-bit compiler, which 2 types have same size?

  • (A) float and double
  • (B) short and int
  • (C) char and short
  • (D) int and float
πŸ’¬ Discuss
βœ… 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

Explanation by: Mr. Dubey

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

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
336
Total Visits
πŸ“½οΈ
5 y ago
Published
πŸŽ–οΈ
Akash Lawaniya
Publisher
πŸ“ˆ
90%
Success Rate