【计算机类职业资格】国家二级C语言(运算符与表达式、基本语句)机试模拟试卷1及答案解析.doc

上传人:rimleave225 文档编号:1332437 上传时间:2019-10-17 格式:DOC 页数:10 大小:54KB
下载 相关 举报
【计算机类职业资格】国家二级C语言(运算符与表达式、基本语句)机试模拟试卷1及答案解析.doc_第1页
第1页 / 共10页
【计算机类职业资格】国家二级C语言(运算符与表达式、基本语句)机试模拟试卷1及答案解析.doc_第2页
第2页 / 共10页
【计算机类职业资格】国家二级C语言(运算符与表达式、基本语句)机试模拟试卷1及答案解析.doc_第3页
第3页 / 共10页
【计算机类职业资格】国家二级C语言(运算符与表达式、基本语句)机试模拟试卷1及答案解析.doc_第4页
第4页 / 共10页
【计算机类职业资格】国家二级C语言(运算符与表达式、基本语句)机试模拟试卷1及答案解析.doc_第5页
第5页 / 共10页
点击查看更多>>
资源描述

1、国家二级 C 语言(运算符与表达式、基本语句)机试模拟试卷 1 及答案解析(总分:62.00,做题时间:90 分钟)一、选择题(总题数:31,分数:62.00)1.表达式(int)(double)92)一 92 的值是( )。(分数:2.00)A.0B.3C.4D.52.若有定义 int x,y;并已正确给变量赋值,则以下选项中与表达式(x-y)?(x+):(y+)中的条件表达式(xy)等价的是( )。(分数:2.00)A.(xy0 xy0)B.(xy0)C.(xy0)D.(xy=0)3.若变量已正确定义,在 if(w)prinff(“dn”,k);中,以下不可替代 w 的是( )。(分数:2

2、00)A.ayB.a(int)(x-y)C.(a*y)bD.y=x+y=x9.设变量已正确定义并赋值,下列表达式中正确的是( )。(分数:2.00)A.x=y+z+5,+yB.int(1585)C.x=y*5=x+zD.x=255010.以下不能将 s 所指字符串正确复制到 t 所指存储空间的是( )。(分数:2.00)A.do*t+=*s+;while(*s);B.for(i=0;ti=si;i+);C.while(*t=*s)t+;s+D.for(i=0,j=0;ti+=sj+;);11.设有定义:int k=0;,以下选项的 4 个表达式中与其他 3 个表达式的值不相同的是( )。(分

3、数:2.00)A.+kB.k+=1C.k+D.k+112.若有定义语句:int year=2009,*p=B.scanf(“ddd”,a,b,c),C.scanf(“d”,p),D.suauf(“d”,p);30.设有定义:int a;float b;,执行 seanf(”2dft,B.scanf(“ddd”,a,b,c),C.scanf(“d”,p), D.suauf(“d”,p);解析:解析:本题重点考查的知识点是标准输入函数 scanf()。scanf()函数要求,除了第一个参数为格式化字符串以外,其余参数均为相应变量的地址值。本题中,只有 p 是地址值,因此 C 选项正确。30.设有定

4、义:int a;float b;,执行 seanf(”2dft,&a,&b);语句时,若从键盘输入 876 5430,则 a 和 b 的值分别是( )。(分数:2.00)A.87 和 60 B.876 和 5430C.87 和 5430D.76 和 5430解析:解析:在格式字符前加入一个整数可以指定输入数据所占的宽度,所以赋值时会将 87 赋给变量a,把 60 赋给 float 型变量 b。31.有以下程序段: #include int j; float y;char name50; seanf(”2dfs”,&j,y,name); 当执行上述程序段时,从键盘上输入 55566 7777abc 后,Y 的值为( )。(分数:2.00)A.5660 B.555660C.77770D.5667770解析:解析:它是格式输入函数,即按用户指定的格式从键盘上把数据输入到指定的变量之中。其中的格式命令可以说明最大域宽。在百分号()与格式码之间的整数用于限制从对应域读人的最大字符数。所以j 的值为 55,y 的值为 5660,字符数组 name 为 7777abc。

展开阅读全文
相关资源
猜你喜欢
  • DIN EN 380-1993 Timber structures test methods general principles for static load testing German version EN 380 1993《木结构 试验方法 静负荷试验一般原理》.pdf DIN EN 380-1993 Timber structures test methods general principles for static load testing German version EN 380 1993《木结构 试验方法 静负荷试验一般原理》.pdf
  • DIN EN 381-1-1993 Protective clothing for users of hand held chain saws part 1 test rig for testing resistance to cutting by a chain saw German version EN 381-1 1993《手持链锯操作者的防护服 第1.pdf DIN EN 381-1-1993 Protective clothing for users of hand held chain saws part 1 test rig for testing resistance to cutting by a chain saw German version EN 381-1 1993《手持链锯操作者的防护服 第1.pdf
  • DIN EN 381-10-2003 Protective clothing for users of hand-held chainsaws - Part 10 Test method for upper body protectors German version EN 381-10 2002《使用手提式链锯防护服 第10部分 上身防护装置试验方法》.pdf DIN EN 381-10-2003 Protective clothing for users of hand-held chainsaws - Part 10 Test method for upper body protectors German version EN 381-10 2002《使用手提式链锯防护服 第10部分 上身防护装置试验方法》.pdf
  • DIN EN 381-11-2003 Protective clothing for users of hand-held chainsaws - Part 11 Requirements for upper body protectors German version EN 381-11 2002《手持式链锯使用者防护服 第11部分 上体防护装置要求》.pdf DIN EN 381-11-2003 Protective clothing for users of hand-held chainsaws - Part 11 Requirements for upper body protectors German version EN 381-11 2002《手持式链锯使用者防护服 第11部分 上体防护装置要求》.pdf
  • DIN EN 381-2-1995 Protective clothing for users of hand held chain saws - Part 2 Test methods for leg protectors German version EN 381-2 1995《手提式链锯使用者防护服 第2部分 腿部防护器的试验方法 德文版本 EN 38.pdf DIN EN 381-2-1995 Protective clothing for users of hand held chain saws - Part 2 Test methods for leg protectors German version EN 381-2 1995《手提式链锯使用者防护服 第2部分 腿部防护器的试验方法 德文版本 EN 38.pdf
  • DIN EN 381-3-1996 Protective clothing for users of hand held chain saws - Part 3 Test methods for footwear German version EN 381-3 1996《手提式链锯使用者保护服 第3部分 鞋靴试验方法》.pdf DIN EN 381-3-1996 Protective clothing for users of hand held chain saws - Part 3 Test methods for footwear German version EN 381-3 1996《手提式链锯使用者保护服 第3部分 鞋靴试验方法》.pdf
  • DIN EN 381-4-1999 Protective clothing for users of hand-held chainsaws - Part 4 Test methods for chainsaw protective gloves German version EN 381-4 1999《手提式链锯使用者防护服 第4部分 保护手套检验方法》.pdf DIN EN 381-4-1999 Protective clothing for users of hand-held chainsaws - Part 4 Test methods for chainsaw protective gloves German version EN 381-4 1999《手提式链锯使用者防护服 第4部分 保护手套检验方法》.pdf
  • DIN EN 381-5-1995 Protective clothing for users of hand held chain saws - Part 5 Requirements for leg protectors German version EN 381-5 1995《手提式链锯使用者防护服 第5部分 腿部防护器的要求 德文版本 EN 381-.pdf DIN EN 381-5-1995 Protective clothing for users of hand held chain saws - Part 5 Requirements for leg protectors German version EN 381-5 1995《手提式链锯使用者防护服 第5部分 腿部防护器的要求 德文版本 EN 381-.pdf
  • DIN EN 381-7-1999 Protective clothing for users of hand-held chainsaws - Part 7 Requirements for chainsaw protective gloves German version EN 381-7 1999《手提式链锯使用者防护服 第7部分 保护手套要求》.pdf DIN EN 381-7-1999 Protective clothing for users of hand-held chainsaws - Part 7 Requirements for chainsaw protective gloves German version EN 381-7 1999《手提式链锯使用者防护服 第7部分 保护手套要求》.pdf
  • 相关搜索

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

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