0

During one of my lectures, my professor opened the wrong coding example (it seemed to be for a more advanced class) and before he switched to correct one, I caught a glimpse of a %j format specifier.

The small glimpse of code looked sorta like any other printf() statement:

printf("%ju\n", numbers[i]); 

I've tried looking for an answer on duckduckgo and the stackoverflow search engine but for some reason I can't find any mention of it.

For example: https://www.tutorialspoint.com/format-specifiers-in-c No mention of %j whatsoever.

Anyone knows why this might be the case?

  • 1
    Look [here](https://stackoverflow.com/questions/20364486/conversion-specifier-ju): Defined in the C99 standard as `j — Specifies that a following d, i, o, u, x, X, or n conversion specifier applies to an argument with type pointer to intmax_t or uintmax_t.` – paulsm4 Jul 02 '22 at 02:06
  • "I've tried looking for an answer " --> Instead look for the C spec: https://stackoverflow.com/q/4233925/2410359 – chux - Reinstate Monica Jul 02 '22 at 04:45
  • Or simply consult [man 3 printf](https://man7.org/linux/man-pages/man3/printf.3.html) – David C. Rankin Jul 02 '22 at 04:54

0 Answers0