what is the difference between %# and % in printf

This is a discussion on what is the difference between %# and % in printf within the C Programming forums, part of the General Programming Boards category; printf ("Some different radixes: &#37;d %x %o %#x %#o \n", 100, 100, 100, 100, 100);
%x shows 100 in hexadecimal ...

# The result is converted to an ‘‘alternative form’’. For o conversion, it increases
the precision, if and only if necessary, to force the first digit of the result to be a
zero (if the value and precision are both 0, a single 0 is printed). For x (or X)
conversion, a nonzero result has 0x (or 0X) prefixed to it. For a, A, e, E, f, F, g,
and G conversions, the result of converting a floating-point number always
contains a decimal-point character, even if no digits follow it. (Normally, a
decimal-point character appears in the result of these conversions only if a digit
follows it.) For g and G conversions, trailing zeros are not removed from the
result. For other conversions, the behavior is undefined.