题目内容

【说明】 函数MultibaseOutput(long n,int B)的功能是:将一个无符号十进制整数n转换成 B(2≤B≤16)进制数并输出。该函数先将转换过程中得到的各位数字入栈,转换结束后再把B进制数从栈中输出。有关栈操作的诸函数功能见相应函数中的注释。C代码中的符号常量及栈的类型定义如下: #define MAXSIZE 32 typedef struct int * elem; /*栈的存储区*/ int max; /*栈的容量,即栈中最多能存放的元素个数*/ int top; /*栈顶指针*/ Stack; 【代码】 int InitStack(Stack * S,int n) /*创建容量为n的空栈*/ S -> elem = (int*) malloc(n*sizeof(int)); if(S -> elem == NULL) return-1 S->max=n; (1) =0;return 0; int Push (Stack * s,int item) /*将整数item压入栈顶*/ if(S->top==S->max)printf("Stack is full! \n");return-1; (2) = item; return 0 int StackEmpty(Stack S) return(! S. top) 1:0; /*判断栈是否为空*/ int Pop(Stack * S) /*栈顶元素出栈*/ if(! S->top) printf("Pop an empty stack! \n") ;return -1; return (3) ; void MultibaseOutput(long n,int B) int m;Stack S if (InitStack(&S, MAXSIZE)) printf ("Failure! \n"); return; do if( Push( &S, (4) ))printf("Failure! \n"); return; n= (5) ; while(n!=0); while(!StackEmpty(S)) /*输出B进制的数*/ m = Pop(& S); if(m<10) printf("%d",m) ;/*小于10,输出数字*/ else printf("%c",m+55); /*大于或等于10,输出相应的字符*/ printf( "\n") ;

查看答案
更多问题

Questions 22 to 25 are based on the conversation you have just heard.

A realistic goal for learners is to reach a certain level of language proficiency, not native fluency.
B. Students can achieve native-like pronunciation through focused study.
C. Learners should interact with native speakers to gain greater fluency.
D. Teachers need to help students foster a good self-esteem and confidence.

在锁骨中点后上方动脉搏动点是()

A. 锁骨下动脉
B. 颈总动脉
C. 面动脉
D. 颞浅动脉
E. 上颌动脉

无牙颌下颌的内外斜嵴以及牙槽嵴上的一切骨突属于

A. 主承托区
B. 副承托区
C. 缓冲区
D. 边缘封闭区
E. 固位区

患者女,70岁,上下颌牙列缺失,行全口义齿修复,支架试戴正常,排牙充胶,采用微波聚合,戴牙时发现塑料基托与黏膜不密合,而金属基托未见异常 热凝塑料在气压聚合时,水的沸点可以达到

A. 90~100℃
B. 1000~110℃
C. 110~120℃
D. 120~130℃
E. 130~140℃

答案查题题库