you have an union between an integer and a structure containing 2 chars.
The code is changing the first char of the structure. Because of the union, it affects the first byte of the other union member, which is the integer.
On a little-endian machine, setting the first byte of an integer to 5 makes this integer 5 and that's what you're seeing here.
On a big-endian machine you end up with a very big value depending of the actual size of an integer.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…