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

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

1、国家二级( C语言)章节练习试卷 4及答案与解析 1 sizeof(float)是 _。 ( A)一个双精度型表达式 ( B)一个整型表达式 ( C)一种函数调用 ( D)一个不合适法的表达式 2 C语言中实现数据输出的标准库函数是 _。 ( A) printf ( B) scanf ( C) putchar ( D) getchar 3 以下正确的说法是 _。 ( A)定义函数时,形参的说明可以放在函数体内 ( B) return后边的值不能为表达式 ( C)如果函数值的类型与返回值 类型不一致,以函数值类型为准 ( D)如果形参与实参的类型不一致,以实参类型为准 4 以下不正确的说法是 _

2、 ( A)在不同函数中可以使用相同名字的变量 ( B)形式参数是局部变量 ( C)在函数内定义的变量只在本函数范围内在效 ( D)在函数内的复合语句中定义的变量在本函数范围内在效 5 若调用 fputc()函数输出字符不成功,则其返回值是 _。 ( A) EOF ( B) NULL ( C)非 0值 ( D)输出的字符 6 有如下程序 int func(int a,int b) return (a+b); main() int x=2,y=5,z=8,r; r=func(fnnc(x, y), z); printf(“%dn“, r); 该程序的输出结果是 _。 ( A) 12 ( B) 1

3、3 ( C) 14 ( D) 15 7 有以下程序 _。 #define P 3 void F(int x) return(P*x*x); main() printf(“%dn“, F(3+5); 程序运行后的输出结果是 _。 ( A) 192 ( B) 29 ( C) 25 ( D)编译出错 8 程序中对 fun()函数有如下说明 void *fun(); 此说明的含义是 _。 ( A) fun函数无返回值 ( B) fun函数的返回值可以是任意的数据类型 ( C) fun函数的返回值是无值型的指针类型 ( D)指针 fun指向一个函数,该函数无返回值 9 以下程序的输出结果是 _。 mai

4、n () int x=5, n=3, s,j; for(j=0; j 2; j+) s=fun(x,n); printf(“%d“, s); fun(int a, int b) static int n=0, i=2; i=n+1; n=i+a-b; return(n); ( A) 3 7 ( B) 3 5 ( C) 3 6 ( D) 3 3 10 以下对 C语言函数的有关描述中,正确的是 _。 ( A)调用函数时,只能把实参的值传送给形参,形参 的值不能传送给实参 ( B)函数既可以嵌套定义,又可以递归调用 ( C)函数必须有返回值,否则不能使用函数 ( D)有调用关系的所有函数必须放在同一

5、个源程序文件中 11 下列程序的输出结果是 _。 int t(int x, int y, int cp, int dp) cp=x*X+y*y; dp=x*x-y*y; main() int a=4,b=3,c=5,d=6: t(a,b, c, d); printf(“%d%dn“ ,c, d); ( A) 4 5 ( B) 4 6 ( C) 5 6 ( D) 5 5 12 C语言规定,简单变量作实参时,它和对应形参之间的数据传递方式是_。 ( A)由实参传给形参,再由形参传回给实参 ( B)地址传递 ( C)单向值传递 ( D)由用户指定传递方式 13 标识符只能由 _、 _和 _三种字符组成。 国家二级( C语言)章节练习试卷 4答案与解析 1 【正确答案】 B 2 【正确答案】 A 3 【正确答案】 C 4 【正确答案】 D 5 【正确答案】 C 6 【正确答案】 D 7 【正确答案】 D 8 【正确答案】 C 9 【正确答案】 C 10 【正确答案】 A 11 【正确答案】 C 12 【正确答案】 C 13 【正确答案】 字母 数字 下划线

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