Reading this SO question, I started wondering - what is the correct way to use scanf/printf (and family) with fixed size types?
scanf
printf
For example
The correct way is to use inttypes.h which defines standard macros for printf family and the scanf family, e.g.
printf ("%" PRId16, short_int); scanf ("%" SCNd16, &short_int);