In the following page, I found the code like
CERT INT15-C Use intmax_t or uintmax_t for formatted IO on programmer-defined integer types
uintmax_t temp; if(scanf("%ju", &temp) != 1) { ... I am not familiar with the "%ju" specifier. And I am not successful in finding the explanation of the "%ju" on the Internet.
Is this defined by some specific compiler environment, or generally used one?
1 Answer
%ju is just the %u (unsigned) format with a j length modifier, the latter being defined in the C99 standard as:
0
j— Specifies that a followingd,i,o,u,x,X, ornconversion specifier applies to an argument with type pointer tointmax_toruintmax_t.