This one and even little more has been described here:
cross-platform printing of 64-bit integers with printf
TL;DR:
You can use PRId64 macro (from inttypes.h) to print 64 bit integers in decimal in a semi-portable way. There are also other macros (like PRIx64).