0

If bool, chars and shorts are promoted to ints when passed through an ellipsis parameter, what's the point of the h length qualifier of printf if printf will read ints anyway?

NOTE: I'm more interested in the semantics and intented purpose of the h length qualifier from a C++ perspective, in case there's any difference respect to C, although I guess it doesn't.

ABu
  • 10,423
  • 6
  • 52
  • 103
  • This is probably better posted as a C question, since the C++ standard includes printf by reference to C specification – M.M Jun 14 '20 at 22:49
  • 1
    anyway, the answer is that they are obviously important for `scanf` (and `printf` with `%n`), so included in general printf for symmetry – M.M Jun 14 '20 at 22:52

0 Answers0