I can never understand how to print unsigned long datatype in C.
unsigned long
Suppose unsigned_foo is an unsigned long, then I try:
unsigned_foo
The format is %lu.
%lu
Please check about the various other datatypes and their usage in printf here