Maybe a better question is: why do you want to know the alignment of different data types? Since it can change depending on which platform you are compiling for, writing your code assuming a particular alignment is generally a very bad idea.
Not only want to know the alignment of different data types, there are also other things, the reasons are:
1. Because I want to learn and understand how the compiler works.
2. If I find a mistake, I would like to know how to fix it
thanks.
