如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
第PAGE\*MERGEFORMAT3页HYPERLINK"http://www.4juan.com/ke.htm"2008年4月计算机软件基础(一)试卷参考答案一、l.C2.A3.D4.A5.C6.C7.B8.D9.Al0.D11.Cl2.Cl3.Bl4.Dl5.B二、l6.y>30&&y<5017.518.319.0.720.物理结构(或存储结构)21.Q->prior->next=t22.10823.入度24.9825.工具三、26.27.(1)广度优先遍历的顶点序列:l256734(2分)(2)最小生成树:(2分)分)28.(1)哈夫曼编码树:(2分)(2)哈夫曼编码:a:1110b:llllc:110d:00e:01f:10(2分)29.(1)直接选择排序8,61,12,75,33,54,41(2分)(2)直接插人排序33,61,l2,75,8,54,41(2分)四、30.1111(2分)1312(2分)31.9(2分).11(2分)32.①max<x[i](或x[i]>max)(2分)②x[14]=maX(2分)33.①Q->head==Q->tail(2分)②(Q->head+1)%100(2分)五、【说明】下述答案仅供参考,若采用其他方法答题,只要正确实现题目要求,仍可获满分。若程序不完整,可酌情给分。34.main(){inti,n=0;floatx[10],av=0;for(i=0;i<10;i++){scanf(“%f",&x[i]);av=av+x[i];}av=av/l0;for(i=0;i<10;i++)if(X[i]>av){n++;printf(“%7.2f\n”v[i]);}printf(“%d\n”,n);}【评分参考】定义正确3分,输入正确l分、平均值计算正确2分,输出正确3分。35.参考答案一:typedefstructnode{intdata;structnode%Lchild.*Rchild;}NODE;voidleaf(NODE*root){if(root!=NULL){if((root->Lehild!=NULL&&root->Rchild==NULL)!!(root->Lehild==.NULL&&root->RchildI=NULL))n=n+1:leaf(root->Lchild);leaf(root->Rehild);}}参考答案二:structnode{intdata;structnode*Lchild.*Rchild;};voidleaf(structnode*root){if(root!=NULL){if((root->LchildI=NULL&&root->Rchild==NULL)!!(root->Lchild==NULL&&root->Rchild!=NULL))n=n+1:leaf(root->Lchild);leaf(root->Rchild);}}【评分参考】结构定义正确2分,函数定义正确2分,条件正确3分,递归正确2分。