To read an int using scanf we use:
int
scanf(\"%d\", &i);
What if i is a long not int??
i
long
Just use
long l; scanf("%ld", &l);
it gives me an irritating warning..
That warning is quite right. This is begging for stack corruption.