this is just a common stack with top etc... and when I print out the pop(stack) as %d with printf it prints fine and stack->top is correct when printed and all information is sent correctly to reverseStack but when I try to set tempString[inc] = pop(stack) it is returned as random ASCii nothingness and I also tried typecasting (char) pop(stack) with the same result... the point of this function is simply to temporarily store a stack as a string so it can be reloaded in the opposite order. Any help as to why this is occuring would be greatly appreciated!Code:int isEmpty(STACK *stack) { return (stack->top < 0); } ... int pop(STACK *stack) { int x; if(stack->top < 0) printf("\n*** Stack is empty.\n"); else { x = stack->number[stack->top]; stack->top--; } return x; } ... void reverseStack(STACK *stack) { char tempString[MAX_SIZE]; int i = 0, inc = 0; while(!isEmpty(stack)) { tempString[inc] = pop(stack); inc++; } for(inc; inc < strlen(tempString); inc++) push(stack, (int) tempString[inc] - 48); }