% Ju conversion spec

On the next page, I found code like

CERT INT15-C Use intmax_t or uintmax_t for formatted I / O for integer-defined integer types

uintmax_t temp; if(scanf("%ju", &temp) != 1) { ... 

I am not familiar with the% ju specifier. And I can not find the explanation of "% ju" on the Internet.

Is this determined by any particular compiler environment or is it usually used alone?

+6
source share
1 answer

%ju is just a %u (unsigned) format with a modifier of length j , the latter is defined in the C99 standard as follows:

j - indicates that for an argument with a pointer of type <<24>, i , o , u , x , x or n , the following argument is used: t211> or uintmax_t .

+8
source

Source: https://habr.com/ru/post/959292/


All Articles