▲ 2 r/C_Programming
Does alignment padding applies only to structs?
I know depending on the order of variables in struct can have different size but is this the case only for structs or it's also true in other cases? Like will something like this
int main(){
float a ;
char b;
float c;
char d;
return 0;
}
take up more memory than if I grouped it?
float a ;
float c;
char b;
char d;
u/Dragonaax — 12 hours ago