What is the difference between atol() & strtol()?
According to their man pages, they seem to have the same effect as well as matching arguments:
atol(str) is equivalent to
atol(str)
strtol(str, (char **)NULL, 10);
Use strtol if you want the end pointer (to check whether there are more characters to read or if in fact you have read any at all) or a base other than 10. Otherwise, atol is fine.