If I'm understanding you correctly, you're going to want to look at int atoi (constchar* str).
Usage:
1 2
char my_var_char[256] = "52";
int my_var_int = atoi(my_var_char);
Don't forget to consider the possibility that an overflow might occur. In other words, if the string representation of the number is too big to fit in an int variable, you might not get what you expect.