To read an int using scanf we use:
int
scanf(\"%d\", &i);
What if i is a long not int??
i
long
Check this, here is the answer: "%I64d"