第1题
Thedata the Censtus Bureau collected indicates that______________
A.technology has widened the gap between the richand the poor
B.individual interest in computers might be asignificant reason
C.the survey has covered more than enough investigationsamples
D.the estimation by the Census Bureau is subjectto correction
第2题
阅读下列说明和C代码,将应填入(n)处的字句写在对应栏内。
【说明】
栈(Stack)结构是计算机语言实现中的一种重要数据结构。对于任意栈,进行插入和删除操作的一端称为栈顶(Stock Top),而另一端称为栈底(Stock Bottom)。栈的基本操作包括:创建栈(NewStack)、判断栈是否为空(IsEmpty)、判断栈是否已满(IsFull)、获取栈顶数据(Top)、压栈/入栈(Push)、弹栈/出栈(Pop)。
当设计栈的存储结构时,可以采取多种方式。其中,采用链式存储结构实现的栈中各数据项不必连续存储(如下图所示)。
以下C代码采用链式存储结构实现一个整数栈操作。
【C代码】
typedef struct List {
int data; //栈数据
struct List* next; //上次入栈的数据地址
}List;
typedef struct Stack{
List* pTop; //当前栈顶指针
}Stack;
Stack* NewStack() {return (Stack*) calloc(1/sizeof(Stack));}
int IsEmpty(Stack* S){//判断栈S是否为空栈
if((1))return 1;
return 0;
}
int Top(Stack* s){//获取栈顶数据。若栈为空,则返回机器可表示的最小整数
if(IsEmpty(S))return INT_ MIN;
return (2);
}
void Push(Stack* S,int theData) {//将数据theData压栈
List* newNode;
newNode=(List*)calloc(1/sizeof (List));
newNode->data=theData;
newNode->next=S->pTop;
S->pTop=(3);
}
void Pop(Stack* S) {//弹栈
List* lastTop;
if(IsEmpty(S) ) return;
lastTop=S->pTop;
S->pTop=(4);
free(lastTop);
}
define MD(a) a<<2
int main(){
int i;
Stack* myStack;
myStack= NewStack();
Push(myStack,MD(1));
Push(myStack,MD(2));
Pop(myStack);
Push(myStack,MD(3)+1);
while(!IsEmpty(myStack) ){
printf("%d",Top(myStack));
Pop(myStack);
}
return 0;
}
以上程序运行时的输出结果为:(5)
第3题
A. Use one additional disk to create a mirror for drive
B. Use two additional disks to create a striped set for drive
C. Use three additional disks to create a RAID-5 volume for drive
D. Use two additional disks to create a RAID-5 volume for drive
第4题
A.可以保存网页中的声音
B.可以将网页全部信息保存后脱机查看
C.可以将网页保存为文本文件
D.保存的网页文件只能存放在计算机桌面
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!