code below gives O/P 4 when sizeof(obj) is computed..how it works..is structure padding different for pointer data types..
#include <stdio.h>
struct x
{
double *a;
};
int main()
{
struct x obj;
printf("%d\n",sizeof(obj));
return 0;
}
created
last reply
- 1
reply
- 274
views
- 2
users