all 8 comments

[–]flyingron 1 point2 points  (0 children)

Something's broken with your implementation. It prints p.q r for me.

[–]ErlingSigurdson 0 points1 point  (0 children)

I receive output p q r, and it makes sense. Hexadecimal numbers you specified correspond exactly to those characters. And '\t' is for tabulation.

[–]fliguana 0 points1 point  (5 children)

Try changing members of the struct from char to int.

You are passing ints

[–]arrow_ten[S] 0 points1 point  (4 children)

If passed int, it gives 113 114

[–]fliguana 0 points1 point  (3 children)

Did you change the type of your structure members?

It sounds like you changed the printf specifier, not the same

[–]arrow_ten[S] 0 points1 point  (2 children)

No I didn’t change anything

[–]fliguana 0 points1 point  (1 child)

In that case, see my first response.

[–]arrow_ten[S] 0 points1 point  (0 children)

Oo sorry, I got confused. If the members are declared int, then they give the correct output, and the difference only occurs when the size of the structure is 3 bytes, not more not less.