I am trying to find out if there is an alternative way of converting string to integer in C.
I regularly pattern the following in my code.
char s[] =
Yes, you can store the integer directly:
int num = 45;
If you must parse a string, atoi or strol is going to win the "shortest amount of code" contest.
atoi
strol