#define SCNdPTR SCNd16 

decimal scanf format for intptr_t