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:

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.

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.