I have following thing which i wanted to convert to int.
char *ptr; // this can point to variable length of string int balance = functionToConverIntoint(ptr
Yes. atoi is a basic one with very limited error handling capability; strtol is a better one.
atoi
strtol