Browse - Programming Tips - How to printf() size_t ?

Date: 2018aug30
Language: C/C++
Keywords: sprintf, snprintf

Q.  How to printf() size_t ?

A.  Use %zd like this

size_t n = 100; printf("n=%zd\n", n);