'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.
In reply to Re: printf x format ?
by ikegami
in thread printf x format ?
by pgmer6809
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |