Why can one printf() in C not print two 64-bit values at the same time?

后端 未结 5 1383
走了就别回头了
走了就别回头了 2020-12-29 00:14

I am working on a 32-bit system. When I try to print more than one 64 bit value in a single printf, then it cannot print any further (i.e. 2nd, 3rd, ...) variable values.

5条回答
  •  时光说笑
    2020-12-29 00:38

    Use:

    "%lli" for int64_t
    "%llu" for uint64_t
    "%llx" for hex
    "%llX" for HEX
    

    Have a look inside "inttypes.h".

提交回复
热议问题