About 51 results
Open links in new tab
  1. Correct printf format specifier for size_t: %zu or %Iu?

    Mar 25, 2013 · MS Visual Studio didn't support %zu printf specifier before VS2013. Starting from VS2015 (e.g. _MSC_VER >= 1900) %zu is available. As an alternative, for previous versions of …

  2. c - Is the %zu specifier required for printf? - Stack Overflow

    Instead of 123, I got zu. Other specifiers work correctly. If size_t exists shouldn't zu also be available in printf? Is this something I should contact my library vendor about, or is a library implementation …

  3. printf - Difference between %zu and %lu in C - Stack Overflow

    Jul 29, 2022 · What is the difference between %zu and %lu in string formatting in C? %lu is used for unsigned long values and %zu is used for size_t values, but in practice, size_t is just an unsigned long.

  4. Is using %zu correct syntax in a printf format string as shown in some ...

    Is using %zu correct syntax in a printf format string as shown in some C code found on Wikipedia? Asked 15 years, 11 months ago Modified 7 months ago Viewed 3k times

  5. c - %zu format specifier with C99 not working - Stack Overflow

    Aug 4, 2023 · I'm willing to print a size_t value using the %zu format specifier in my format string, however, I always get "zu" as an output, rather than the actual value in my size_t …

  6. How to get MinGW GCC to recognize the %zu format specifier for size_t?

    Aug 23, 2021 · Apparently %zu is handled as not supported, which might not be necessarily true. (A quick check with MinGW64's GCC 8.1.0 on Windows 10 shows the warning, but works.) However, …

  7. printf format specifiers for uint32_t and size_t - Stack Overflow

    Oct 19, 2016 · size_t is trickier, which is why %zu was added in C99. If you can't use that, then treat it just like k (long is the biggest type in C89, size_t is very unlikely to be larger). ... If you don't get the …

  8. c - Proper way to scanf and printf a size_t variable (platform ...

    Dec 25, 2016 · %zu for size_t, with %z for length, and %u for unsigned Details can be found at 7.21.6.1 The fprintf function 6 The flag characters and their meanings are: ... z Specifies that a following d, i, …

  9. Platform independent size_t Format specifiers in c?

    Jan 24, 2010 · 53 Yes, there is. It is %zu (as specified in ANSI C99). ... Note that size_t is unsigned, thus %ld is double wrong: wrong length modifier and wrong format conversion specifier. In case you …

  10. Newest 'python' Questions - Stack Overflow

    Apr 1, 2026 · Stack Overflow | The World’s Largest Online Community for Developers