i getting the same solution for below program while changing the pack value in pragma
i getting output as :6 in both case of prgma pack vaues 2 and 4.Code:#include<stdio.h> #pragma pack(2) struct hai { char ch1; char ch2; char ch3; char ch4; char ch5; }s; int main() { printf("%d \n",sizeof(s)); return 0; }
why i getting same values , please any body clear my confusion