If i define a char variable
char a;
and a structure with a single char member
struct OneChar {
char a;
};
<
When you take the size of a struct, it includes the padding bytes. But, if you have something like the following:
void fun()
{
char c;
int n;
}
The compiler is free to insert padding for whatever reason it sees. So, the padding could be there in case of standalone variables, you just can't know about that like in the case of a struct.