Unusal output using atoi() function

I'm on my final stages of bug fixing and this one has been eluding me for a while. I have been searching for threads where others have had this problem and cant seem to find a similar problem as here.

//partC declared to have the potential to store 14999.00 plus null character
char partC[9] = { '0', '0', '0', '0', '0', '0', '0', '0', '\0' }; //Additional space added for null character

//Function acquires data which is also padded with zeros
void retrieveData() {
 partC = source of data;  //STEP 1

//Function returns data in this format 0029567 (Range 0000062 to 1499999)
//This number needs to be converted to an int and then shifted two decimal places

long partCntInt = atoi(partC); //Convert char array to long STEP 2
double partCntFloat = partCntInt/100.0; // STEP 3

There seems to be some unusual behaviour with the atoi() step. I will give a couple of examples of expected and unexpected behaviour.

STEP 1: 0021634
STEP 2:21634
STEP 3:216.34

STEP 1: 0049262
STEP 2:-16274 (why wouldn't it be 49262??? )
STEP 3:-162.74

This doesn't happen every time but occurs every couple of minutes or so. I cant figure out why a negative random value keeps popping up here.

Use atol or strtoul.

The "i" in atoi() means integer.