标签:指针 efi its scan stack struct sizeof print seq
typedef int SElemType;
typedef struct{
int elem;
int maxSize,top;
}SeqStack;
int main(){
SeqStack S;
int x,j,count;
S.elem= (SElemType)malloc(initSize*sizeof(SElemType));//创建栈空间 ,chu shi hua
S.maxSize=initSize; //
S.top=-1;
if(S.top==S.maxSize-1) return 0;
S.elem[++S.top]=x;//指针先加1,再加栈
//shu ru
scanf("%d",x);
while(x){
x=x/2;
j=j%2;
S.elem[++S.top]=j;
count++;
printf("%d",count);
}
//chu zhan
j=S.elem[S.top--];
printf("%d",S.elem[S.top]);
}
标签:指针 efi its scan stack struct sizeof print seq
原文地址:https://www.cnblogs.com/isudh5554537/p/10769641.html