I don't think your char is long enough to be safely used with itoa(). To actually answer your question, however, I would just set temp[3] = '\0' which would end the C-string.
That works great with int. If it wasn't an int you would have to search the char array for (hopefully) the null character('\0') and then set the previous index to '\0'.