hi all,
this may be a basic problem, but confusing me as a beginner.
here follows a small piece of code :-
struct ask
{
int a1;
char ch[10];
};
int main()
{
ask z;
cout<<"size of ask="<<sizeof(z)<<"\n";
}
it should result :-
size of ask=14 (4 for int+10 for the array)
but giving : 16
I checked with sizeof(z.a1) which gives correctly 4.
please clarify !