πŸ“Š C Programming
Q. Which of these uses the most memory?
Code:
union data {
    int i;
    float f;
    char str[20];
};
  • (A) i
  • (B) f
  • (C) str
  • (D) Depends on the usage
πŸ’¬ Discuss
βœ… Correct Answer: (C) str

Explanation: Unions use the memory of the largest member. str[20] uses 20 bytes.

Explanation by: Mr. Dubey
Unions use the memory of the largest member. str[20] uses 20 bytes.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
44
Total Visits
πŸ“½οΈ
9 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
87%
Success Rate