padding.
structs are often padded to DWORD sizes to make indexing more efficient.
Are these padding bytes placed at the beginning or at the end of structure?
No, they are placed anywhere the compiler feels like putting them.
Most likely in your case the bytes are between y and p so that p is word-aligned.
Because the compiler have to make sure, that the integer var lies on an address that is a multiple of 4 (32bit) or something like this.
While you're at it, note that an empty class has a size of [at least] 1.
All compilers provide a #pragma to change the alignment.