πŸ“Š C Programming
Q. What will sizeof return for the following structure?
Code:
struct sample {
    char c;
    int i;
};
  • (A) 5
  • (B) 8
  • (C) 6
  • (D) 4
πŸ’¬ Discuss
βœ… Correct Answer: (B) 8

Explanation: Padding for alignment makes the size 8 bytes on most systems.

Explanation by: Mr. Dubey
Padding for alignment makes the size 8 bytes on most systems.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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