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

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

1、国家二级( C语言)章节练习试卷 30 及答案与解析 1 有如下程序 #define N 2 #define M N+1 #define NUM 2*M+1 main() int i; for(i=1; i =NUM; i+) printf(“%dn“i) 该程序中的for循环执行的次数是 _。 ( A) 5 ( B) 6 ( C) 7 ( D) 8 2 下列程序执行后的输出结果是 _。 #define MA(x) x*(x-1) main()int a=1,b=2; printf(“%dn“,MA(1+a+b); ( A) 6 ( B) 8 ( C) 10 ( D) 12 3 以下程序运行后

2、输出结果是 _。 #define PT 5.5 #define S(x) PT*x*x main() int a=1, b=2; printf(“%4.1 fn“,S(a+b); ( A) 49.5 ( B) 9.5 ( C) 22 ( D) 45 4 以下叙述中正确的是 _。 ( A)预处理命令行必须位于源文件的开头 ( B)在源文件的一行上可以有多条预处理命令 ( C)宏名必 须用大写字母表示 ( D)宏替换不占用程序的运行时间 5 以下程序运行后,输出结果是 _。 fut(int*s, int p23) *s=p11; main() int a23=1, 3, 5, 7, 9, 11,

3、 *p; p=(int*) malloc (sizeof(int); fut(&p, a); printf(“% dn“, *p); ( A) 1 ( B) 7 ( C) 9 ( D) 11 6 以下程序的输出结果是 ( )。 #finclude “stdlib.h“ fun(int*p,int a33) *p=a22; main() int a33=2, 4, 6, 8, 10, 12,14,16, 18,*p; p=(int*)mallocsizeof(int); fun(&p, a); printf(“%dn“, *p); ( A) 6 ( B) 16 ( C) 12 ( D) 18 7 动态分配一整型数据长度的空间,使指针 p指向该存储空间,则下列空缺处应填入 的正确语句是 ( )。 int*p; p=_malloc (sizeof(int); ( A) int ( B) int* ( C) (*int) ( D) (int*) 8 己知变量 a为 float型,则 a在内存中占 _个字节,该变量的地址是第_个字节的地址。 国家二级( C语言)章节练习试卷 30 答案与解析 1 【正确答案】 B 2 【正确答案】 B 3 【正确答案】 B 4 【正确答案】 D 5 【正确答案】 C 6 【正确答案】 D 7 【正确答案】 D 8 【正确答案】 4, 1

展开阅读全文
相关资源
猜你喜欢
  • 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