So there must be some better alignment now.So, as we can think of compiler went for greedy alignment and now it's able to align optimally (Remember compiler can’t change the order of data member).Above is the
Above is the alignment of the structureA, and that's why thesize of the struct is 32 Bytes. Also, the objectaof type structAis 32 Bytes. How compiler adds padding? Now the question is how compiler adds padding and align? The method is compiler dependent and kind of greedy. It aligns ...