C uses octal (\nnn) as a default for escape sequences for characters with values beyond the basic ASCII range. This is part of the C standard. If you want a hexadecimal representation, you have to explicitly format it.