A simple C question, What is the maximum size occupied by a structure? This question was asked by R* after reading some C books as a part of his placement preperation. The question is very very simple still i wanted to check how many are like me.
#include
int
main ()
{
struct simple
{
int a,b,d;
char c[2];
}tmpob;
int size;
size = sizeof (tmpob);
printf ("Total size of structure : %d\n",size);
return 0;
}
Predict the answer and give some explanation so that i may know the answer.