From this link.

See 7.19.6.1/7 in the C99 standard, or the more convenient POSIX documentation of formatting codes:

http://pubs.opengroup.org/onlinepubs/009695399/functions/fprintf.html

To print off_t:

printf("%jd\n", (intmax_t)x);
To print size_t:
printf("%zu\n", x);
To print ssize_t:
printf("%zd\n", x);

from StackOverflow: http://stackoverflow.com/questions/586928/how-should-i-print-types-like-off-t-and-size-t