What is the size of empty structure in c?



What is the size of empty structure in c?..

Answer / Jitendra Kumar Yadav

The size of an empty structure is equal to the sum of sizes of its members (if any) plus the size of a struct alignment padding needed for alignment purposes. If there are no members, then the size will still be non-zero due to alignment requirements.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What is character set?

1 Answers  


What's a "sequence point"?

3 Answers  


Are the outer parentheses in return statements really optional?

1 Answers  


Explain what is output redirection?

1 Answers  


What is a const pointer?

1 Answers  


code for bubble sort?

1 Answers  


What is pivot in c?

1 Answers  


How can I read a binary data file properly?

1 Answers  


we all know about the function overloading concept used in C++ and we all learnt abt that.... but that concept is already came in C in a very smaller propotion ... my question is IN WHICH CONCEPT THERE IS A USE OF FUNCTION OVERLOADING IS USED in C language?????????????

4 Answers   Google,


Why the below program throughs error during compilation? #include<stdio.h> #include<conio.h> enum { ZERO, ONE, TWO, }; main() { printf("%d",&TWO); getch(); }

2 Answers  


What is wild pointer in c?

1 Answers  


what are the facialities provided by you after the selection of the student.

1 Answers   TCS,


Categories