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

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

1、国家二级( C语言)章节练习试卷 26 及答案与解析 1 设有定义语句: char c1=92, c2=92;,则以下表达式中值为零的是 _。 ( A) c1c2 ( B) c1&c2 ( C) c2 ( D) c1|c2 2 设有说明语句: char a=72;,则变量 a_。 ( A)包含 1个字符 ( B)包含 2个字符 ( C)包含 3个字符 ( D)说明不合法 3 有以下程序 main() int c=35; printf(“%dn“,c&c); 程序运行后的输出结果是 _。 ( A) 0 ( B) 70 ( C) 35 ( D) 1 4 有如下程序段 int a=14,b=15,

2、x; char c=A; x=(a&b)&(c B); 执行该程序段后, x的值为 _。 ( A)真 ( B)假 ( C) 0 ( D) 1 5 已知字母 a的 ASCII码为十进制数的 97,下面程序的输出结果是 _。 main() char c1,c2; c1=a+5-3; c2=a+6-3; printf(“%c, %dn“,c1, c2); ( A) 100,d ( B) c, 100 ( C) c, d ( D)输出格式不对,结果不确定 6 已知字符 A的 ASCII代码值为 65,以下程序运行时,若从键盘输入: B33回车。则输出结果是 _。 #include “stdio.h“

3、main() char a, b; a=getchar(); scanf(“Xd“,&b); a=a-A+0; b=b*2; printf(“%c cn“, a, b); ( A) 2 B ( B) 1 B ( C) 3 B ( D) 4 B 7 以下程序的输出结果是 _。 main() int i: for(i=A; i i; i+, i+) printf(“%c“, i+32): printf(“n“); ( A) acfg ( B) bcfg ( C) acef ( D) aceg 8 在执行以下程序时,如果从键盘上输入: ABCdef回车,则输出为 _。 main() char ch;

4、 while(ch=getchar()!=n) if(ch =A & ch =Z) ch=ch+32; else if(ch =a&ch =2)ch=ch-32; printf(“%c“, ch); printf(“n“); ( A) ABCdef ( B) abcDEF ( C) abc ( D) DEF 9 下面的 if语句与 y=(x =10)?3*x-11: (x 1)?x:2*x-1;的功能相同,请补充完整。 if(_) if(_)y=2*x-1; else y=x; else y=3*x-11; 国家二级( C语 言)章节练习试卷 26 答案与解析 1 【正确答案】 A 2 【正确答案】 A 3 【正确答案】 C 4 【正确答案】 D 5 【正确答案】 B 6 【正确答案】 B 7 【正确答案】 D 8 【正确答案】 B 9 【正确答案】 x 10 x =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