the sizeof why ??!!
- by hiba salem
hi I hve this code
struct Student {
char name[48];
float grade;
int marks[10,5];
char gender;
};
Student s;
Now I have to get the sizeof s
so i added
printf("%d",sizeof(s));
now when I hit compile the result showing is 256
and its wrong because it shoud be 253
as because the size of
char name[48]; ---- 48
and
float grade; ----- 4
and
int marks[10,5]; ------ 200
and
char gender; -------1
so 48+4+200+1 = 253
so why its telling me 256 ??