Richard said:
karthikbalaguru said:
The behaviour of this program is undefined, for reasons you have
already been told about in a previous thread.
Assuming #include <stdio.h>, what is undefined? I have reread the
following a couple of times without a clue. Trial doesn't work,
since I don't have a C99 library.
a,A A double argument representing a floating-point |
number is converted in the style [-]0xh.hhhhp_d,
where there is one hexadecimal digit (which is
nonzero if the argument is a normalized floating-
point number and is otherwise unspecified) before
the decimal-point character221) and the number of
hexadecimal digits after it is equal to the
precision; if the precision is missing and FLT_RADIX
is a power of 2, then the precision is sufficient
for an exact representation of the value; if the
precision is missing and FLT_RADIX is not a power of
2, then the precision is sufficient to
distinguish222) values of type double, except that
trailing zeros may be omitted; if the precision is
zero and the # flag is not specified, no decimal-
point character appears. The letters abcdef are
used for a conversion and the letters ABCDEF for A
conversion. The A conversion specifier produces a
number with X and P instead of x and p. The
exponent always contains at least one digit, and
only as many more digits as necessary to represent
the decimal exponent of 2. If the value is zero,
the exponent is zero.
A double argument representing an infinity or NaN is
converted in the style of an f or F conversion
specifier.