memory order is same with definition order
However padding is there, we can optimize memory size
Is sizeof for a struct equal to the sum of sizeof of each member? - GeeksforGeeks
Prerequisite : sizeof operator in C The sizeof for a struct is not always equal to the sum of sizeof of each individual member. This is because of the padding added by the compiler to avoid alignment issues. Padding is only added when a structure member is followed by a member with a larger size or at the end of the structure.
https://www.geeksforgeeks.org/is-sizeof-for-a-struct-equal-to-the-sum-of-sizeof-of-each-member/


Seonglae Cho