[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C Programming :: Structures, Unions, Enums - Discussion

Home > C Programming > Structures, Unions, Enums > MCQs Questions Discussion

11 / 43

What will be the size of these structures?

#include <stdio.h>
struct S1 {
char c;
int i[2]; 
double v;
} SA1;
struct S2 {
double x;
int i[2];
char c;
} SA2;
int main()
{
printf("\n sizeof S1 %d : Sizeof S2 %d ",sizeof(SA1),sizeof(SA2));
return 0;
}
Note:char takes 1 byte, int takes 4 bytes, double takes 8 bytes

Asizeof S1 12 : Sizeof S2 12

Bsizeof S1 20 : Sizeof S2 20

Csizeof S1 13 : Sizeof S2 13

DCompilation Error

Answer: Option (Login/Signup)

Show Explanation

Asked In ::

Post Your Answer Here:     

No Discussion on this question yet!