Just because it works for you, doesn't mean it will work for others nor that others should do as you.
Do you remember what this board is about? Standard compliance, for one thing.
You do what you want with your own code, but when you show your code to others, you had better make sure you don't use as many bad practices. Remember that they are usually newbies--they don't know any better! What we teach them is what they learn. Therefore we must use good judgment to create good programmers out there, not to spawn more people that relies on undefined behavior, like you.
I did not say don't use. I said that strtol is better.atoi() worked perfectly. I can't say "don't use atoi() because it might fail", when it's working perfectly. Any C function can fail if it's not used correctly.
And I would also ask if there is a point in using something that is inferior if there is a better alternative that always works. Do you use gets instead of fgets? I thought not.
The point is: strtol is superior to atoi and hence it is better to learn to use it properly instead of atoi. Right? Right???