in reply to printf x format ?

'A' produces a string. The same string as "A".

The formats largely control how numbers are converted to strings for printing. Strings are already strings, so only one format is needed for them (%s).

%c applies chr to a number, %x produces a hex representation of a number, and %d produces a decimal representation of a number.

You probably wanted to pass ord('A') aka 0x41 aka 65.