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