TK <> writes:
> which format can I use for type
>
> unsigned long long
>
> in printf()?
In C99, you can apply the "ll" modifier to a following 'd', 'i', 'o',
'u', 'x', 'X', or 'n'. For example:
unsigned long long var = ...;
printf("var = %llu\n", var);
But note that support for C99 is not universal, and it's not uncommon
for a compiler to support long long, but for the runtime library not
to support "ll". (For example, gcc supports long long, but it uses
whatever runtime library is provided by the system.)
--
Keith Thompson (The_Other_Keith)
kst- <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.