用C语言和栈写一个十进制转八进制的问题

#include<stdio.h>
#include<malloc.h>
#include<stdlib.h>
#define MAXSIZE 100
#define OVERFLOW -1
#define OK 1
#define ERROR -1
void exit(int value);
typedef char Status;
typedef int SElemType;
typedef struct
{
SElemType *base;
SElemType *TOP;
int stacksize;
}SqStack;
//初始化
Status InitStack(SqStack *S)
{
S->base=(SElemType *)malloc(sizeof(SElemType *));
if(!S->base) exit(OVERFLOW);
S->TOP=S->base;
S->stacksize=MAXSIZE;
return OK;
}
//压栈
Status push(SqStack *S,SElemType e)
{
if(S->TOP-S->base==S->stacksize) return ERROR;
else
e=*S->TOP;
S->TOP=S->TOP+1;
return OK;

}
//出栈
Status pop(SqStack *S,SElemType e)
{
if (S->TOP== S->base)
{
return ERROR;
}
else
{
printf("%d\n",e);
S->TOP= S->TOP-1;
e=*S->TOP-1;
//printf("%d\n",e);
return OK;
}
}
//判空
Status StackEmpty(SqStack *S){
if (S->base == S->TOP)
{
return 1;
}
else{
return 0;
}
}
//进制转化
void conversion(SqStack *S,int N)
{
int a=1;
SElemType e;
//InitStack(S);
while(N)
{
a=N%8;
// printf("%d\n",a);
push(S,a);
N=N/8;
}
printf("转化的八进制是:");
while(!StackEmpty(S))
{
pop(S,e);
printf("%d",e);
}
}
main()
{
int N;
SqStack S;
InitStack(&S);
scanf("%d",&N);
conversion(&S,N);
return 0;
}

运行结果一直是1919不知道为什么

https://blog.csdn.net/weixin_34551614/article/details/117065837?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165061977216782246447738%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=165061977216782246447738&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-2-117065837.142^v9^pc_search_result_control_group,157^v4^new_style&utm_term=%E7%94%A8C%E8%AF%AD%E8%A8%80%E5%92%8C%E6%A0%88%E5%86%99%E4%B8%80%E4%B8%AA%E5%8D%81%E8%BF%9B%E5%88%B6%E8%BD%AC%E5%85%AB%E8%BF%9B%E5%88%B6%E7%9A%84%E9%97%AE%E9%A2%98&spm=1018.2226.3001.4187