Convert char array to single int?

Anyone know how to convert a char array to a single int?

char hello[5];
hello = "12345";

int myNumber = convert_char_to_int(hello);
Printf("My number is: %d", myNumber);

Leave a Comment