R
Richard Heathfield
CBFalconer said:
Wrong. "If a conversion specification is invalid, the behavior is
undefined." - C89, 4.9.6.1; C99, 7.19.6.1(9) - same wording in each.
Therefore, neither the de jure nor the de facto C standard imposes any
requirements whatsoever on a program containing a %b format specifier in a
call to any of the *printf standard library functions, and they certainly
do not impose the behaviour you specify.
A failure. It should output the string "b", followed by a newline,
and should ignore the "12345". See the C standard for this correct
performance.
Wrong. "If a conversion specification is invalid, the behavior is
undefined." - C89, 4.9.6.1; C99, 7.19.6.1(9) - same wording in each.
Therefore, neither the de jure nor the de facto C standard imposes any
requirements whatsoever on a program containing a %b format specifier in a
call to any of the *printf standard library functions, and they certainly
do not impose the behaviour you specify.