So as we all probably know, the atoi converts a char to a number. But, what do you do if you only want one of the array elements instead of the whole array?
atoi
Besides just using its integral value as shown by James, you could put it in a seperate buffer:
char buf[2] = { temp[h], '\0' }; num[h] = atoi(buf);