[计算机类试卷]国家二级(C语言)章节练习试卷8及答案与解析.doc

上传人:eveningprove235 文档编号:503259 上传时间:2018-11-29 格式:DOC 页数:4 大小:36KB
下载 相关 举报
[计算机类试卷]国家二级(C语言)章节练习试卷8及答案与解析.doc_第1页
第1页 / 共4页
[计算机类试卷]国家二级(C语言)章节练习试卷8及答案与解析.doc_第2页
第2页 / 共4页
[计算机类试卷]国家二级(C语言)章节练习试卷8及答案与解析.doc_第3页
第3页 / 共4页
[计算机类试卷]国家二级(C语言)章节练习试卷8及答案与解析.doc_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

1、国家二级( C语言)章节练习试卷 8及答案与解析 1 有以下说明和定义语句 struct student int age; char num8; ; struct student stu3=20,“200401“, 21,“200402“, 109,“200403“; struct student*p=stu;以下选项中引用结构体变量成员的表达式错误的是 _。 ( A) (p+)- num ( B) p- num ( C) *p.num ( D) stu0.age 2 设有 以下说明语句 struct num int a; float b; numl;则下面的叙述不正确的是 _。 ( A) s

2、truct是结构体类型的关键字 ( B) struct num是用户定义的结构体类型 ( C) numl是用户定义的结构体类型名 ( D) a和 b都是结构体成员名 3 已知学生记录描述为 struct student int no; char name20; char sex; struct int year; int month; int day; birth; ; struct student s;变量 s中的 “生日 ”应是 “1985年 4月 4日 ”,下列对 “生日 ”的正确赋值方式是 _。 ( A) year=1985; month=4; day=4; ( B) birth.ye

3、ar=1985; birth.month=4; birth.day=4; ( C) s.year=1985; s.month=4; s.day=4; ( D) s.birth.year=1985; s.birth.month=4; s.birth,day=4; 4 有以下程序 struct stu char num10; float score3; ; main() struct stu s3=“20021“,90,95,85, “20022“,95,80,75,“20023“,100,95,90, *p=s; int i; float sum=0; p+; for(i=0; i 3;i+)s

4、um=sum+p- scorei; printf(“%6.2fn“,sum); 程序运行后的输出结果是_。 ( A) 260 ( B) 270 ( C) 250 ( D) 285 5 有以下结构体说明和变量定义,如图所示,指针 p、 q、 r分别指向一个链表中的三个连续结点。 struct node int data; struct node*next; *p, *q,*r; 现要将 q和 r所指结点的先后位置交换,同时要保持链表的连续,以下错误的程序段是 _。 ( A) q- next=r- next; r- next=q; p- next=r; ( B) q- next=r- next;

5、p- next=r; r- next=q; ( C) p- next=r; q- next=r- next; r- next=q; ( D) r- next=q; q- next=r- next; p- next=r; 6 已知: union int i; char c; float a; st;则 sizeof(st)的值是_。 ( A) 4 ( B) 5 ( C) 6 ( D) 7 7 以下程序运行后的输出结果是 _。 void swap(int x,int y) int t; t=x; x=y; y=t; printf(“%d %d “, x, y); main() int a=3,b=

6、4; swap(a, b); printf(“%d %dn“,a,b); 8 以下程序运行后的输出结果是 _。 fun(int a) int b=0; static int c=3; b+: c+; return (a+b+c); main() int i, a=5; for (i=0; i 3; i+)pruntf(“%d%d“, i,fun(a); printf(“n“); 国家二级( C语言)章节练习试卷 8答案与解析 1 【正确答案】 C 2 【正确答案】 C 3 【正确答案】 D 4 【正确答案】 C 5 【正确答案】 D 6 【正确答案】 A 7 【正确答案】 4 3 3 4 8 【正确答案】 0 10 1 11 2 12

展开阅读全文
相关资源
猜你喜欢
  • BS PD IEC TS 62763-2013_5284 Pilot function through a control pilot circuit using PWM (pulse width modulation) and a control pilot wire《通过控制导向线使用PWM (脉冲宽度调制) 的导向功能和控制导向线》.pdf BS PD IEC TS 62763-2013_5284 Pilot function through a control pilot circuit using PWM (pulse width modulation) and a control pilot wire《通过控制导向线使用PWM (脉冲宽度调制) 的导向功能和控制导向线》.pdf
  • BS ISO 8070-2007 Milk and milk products - Determination of calcium sodium potassium and magnesium contents - Atomic absorption spectrometric method《牛奶和奶制品 钙、钠、钾和镁含量的测定 原子吸.pdf BS ISO 8070-2007 Milk and milk products - Determination of calcium sodium potassium and magnesium contents - Atomic absorption spectrometric method《牛奶和奶制品 钙、钠、钾和镁含量的测定 原子吸.pdf
  • BS ISO 8082-1-2009 Self-propelled machinery for forestry - Laboratory tests and performance requirements for roll-over protective structures - General machines《林业用自推进机械 防倾.pdf BS ISO 8082-1-2009 Self-propelled machinery for forestry - Laboratory tests and performance requirements for roll-over protective structures - General machines《林业用自推进机械 防倾.pdf
  • BS ISO 8082-2-2011 Self-propelled machinery for forestry Laboratory tests and performance requirements for roll-over protective structures Machines having a rotating platf.pdf BS ISO 8082-2-2011 Self-propelled machinery for forestry Laboratory tests and performance requirements for roll-over protective structures Machines having a rotating platf.pdf
  • BS ISO 8083-2006 Machinery for forestry - Falling-object protective structures (FOPS) - Laboratory tests and performance requirements《林业机械 落体防护装置(FOPS) 实验室试验和性能要求》.pdf BS ISO 8083-2006 Machinery for forestry - Falling-object protective structures (FOPS) - Laboratory tests and performance requirements《林业机械 落体防护装置(FOPS) 实验室试验和性能要求》.pdf
  • BS ISO 8086-2004 Dairy plant - Hygiene conditions - General guidance on inspection and sampling procedures《乳品厂 卫生条件 检验和取样程序通用指南》.pdf BS ISO 8086-2004 Dairy plant - Hygiene conditions - General guidance on inspection and sampling procedures《乳品厂 卫生条件 检验和取样程序通用指南》.pdf
  • BS ISO 8096-2005 Rubber- or plastics-coated fabrics for water resistant clothing - Specification《雨衣用橡胶或塑料涂覆织物 规范》.pdf BS ISO 8096-2005 Rubber- or plastics-coated fabrics for water resistant clothing - Specification《雨衣用橡胶或塑料涂覆织物 规范》.pdf
  • BS ISO 8097-2001 Aircraft Minimum airworthiness requirements and test conditions for certified air cargo unit load devices《航空器 经认证的航空货运集装单元装置最低适航性要求和试验条件》.pdf BS ISO 8097-2001 Aircraft Minimum airworthiness requirements and test conditions for certified air cargo unit load devices《航空器 经认证的航空货运集装单元装置最低适航性要求和试验条件》.pdf
  • BS ISO 8114-1993 Textile machinery and accessories - Spindles for ring-spinning and doubling machines - List of equivalent terms《纺织机械和附件 环锭纺纱机和并线机用锭子 同义术语表》.pdf BS ISO 8114-1993 Textile machinery and accessories - Spindles for ring-spinning and doubling machines - List of equivalent terms《纺织机械和附件 环锭纺纱机和并线机用锭子 同义术语表》.pdf
  • 相关搜索

    当前位置:首页 > 考试资料 > 职业资格

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1