湖南省2017年普通高等学校对口招生考试计算机应用类综合试卷

发布时间 : 星期三 文章湖南省2017年普通高等学校对口招生考试计算机应用类综合试卷更新完毕开始阅读

reverse(int *s,int i,int j) { int t; if(i

reverse(_______④________); } }

void main() { int a[N]={1,2,3,4,5}; int i=0; reverse(______⑤_______); for(i=0;i

34.阅读程序,修改程序中的错误,不得增行或删行,也不得更改程序结构。请在答题卡中指出错误代码所在的行号,并给出该行修改后的程序代码。(每处5分,共25分)

⑴以下程序从键盘获取字符串输入,并将输入字符串追加写入C盘data.txt文件中去。以下程序只允许修改两行。

L1 void main() L2 { L3 FILE *fp; L4 char buf[100],*fileName=”c://data.txt”; L5 gets(buf); L6 if((fp=fopen(fileName,”w”))!=NULL) L7 { L8 puts(buf); L9 fcloes(fp); L10 } L11 }

⑵函数endsWith(char *str,char *substr)用于判断字符串str是否以子字符串substr结尾,是返回整数1,否返回整数0。以下程序只允许修改三行。 L1 int endsWith(char *str,char *substr) L2 { L3 int sublen=0; L4 while(str !=’\\0’) L5 { L6 if(substr[sublen]!=’\\0’) L7 { L8 sublen++;

9

L9 } L10 str++; L11 } L12 int i=0; L13 for( ;i

五、程序设计题(本大题25分,每空5分)

35.编写程序用于从键盘逐个读取整数,并将整数按照升序插入链表,每插入一个数后将链表中的数据都输出一次,当输入整数0时结束插入。 #include #include struct NumNode { int data; struct NumNode *next; struct NumNode *insertToList(struct NumNode *head,int fdata) { struct NumNode *p,*q; struct NumNode *newNode=(struct NumNode *)malloc(sizeof(struct NumNode)); newNode->data=fdata; newNode->next=NULL; p=head; q=head; if(head==NULL) { ______①_______ return head; } while(p!=NULL&&fdata>p->data) { q=p; p=p->next; } if(p!=NULL) {

10

if(head==p) { _______②_______ } else q->next=newNode; _______③_______ } else {

_______④_______ } return head; }

void printList(struct NumNode *head) { struct NumNode *p=head; while(p!=NULL) { printf(“%d”,p->data); p=p->next; } printf(“\\n”); }

void main() { struct NumNode *head=NULL; int i; scanf(“%d”,&i); while(i!=0) { ______⑤_______ printList(head); scanf(“%d”,&i); } }

六、选考题(考生可根据自己的专业方向,从三组题中任选一组,多选则只计前一组的成绩。每空5分,共40分)

第一组计算机网络技术方向

36.某公司根据业务需求,计划在公司局域网中部署DNS服务器,网络拓扑结构如图8所示。通过配置,局域网中的计算机都能通过域名www.hunan.com访问本公司网络中心的Web服务器。

11

图 8

根据实际情况,如果计算机PC01和PC02需要通过无线方式接入公司局域网,图8中X处应选择的网络设备是_______①________。 A.无线天线 B.无线AP C.无线网卡 D.无线广播 为了实现Internet接入,图8中Y处最合适的网络设备是_____②_____。 A.路由器 B.二层交换机 C.三层交换机 D.集线器

在下列选项中,工作在OSI参考模型数据链路层的网络设备是_______③_______。工作在OSI参考模型网络层的网络设备是______④_______。 A.二层交换机 B.集线器 C.中继器 D.路由器 在DNS服务器中,需要新建正向查找区域,在图9所示对话框中的“区域名称”栏应该设置为___⑤___。 A.www.hunan.com B.hunan.com C.com D.microsoft.com

⑵ ⑶

图 9 ⑸ 在DNS服务器的正向查找区域中,需要新建Web服务器的主机记录,在图10所示的对话框中的“名称”

栏应该设置为_____⑥______。 A.www B.hunan C.www.hunan D.www.hunan.com

12

联系合同范文客服:xxxxx#qq.com(#替换为@)