【计算机类职业资格】全国计算机二级C语言上机试题1+2015年及答案解析.doc

上传人:brainfellow396 文档编号:1329330 上传时间:2019-10-17 格式:DOC 页数:2 大小:24.50KB
下载 相关 举报
【计算机类职业资格】全国计算机二级C语言上机试题1+2015年及答案解析.doc_第1页
第1页 / 共2页
【计算机类职业资格】全国计算机二级C语言上机试题1+2015年及答案解析.doc_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

1、全国计算机二级 C语言上机试题 1+2015年及答案解析(总分:30.00,做题时间:90 分钟)1.给定程序中,函数 fun的功能是:将形参 n所指变量中,各位上为偶数的数去除,剩余的数按原来从高位到低位的顺序组成一个新的数,并通过形参指针 n传回所指变量。 例如,输入一个数:27638496,新的数:为 739。 请在程序的下划线处填入正确的内容并把下划线删除, 使程序得出正确的结果。 注意:源程序存放在考生文件夹下的 BLANK1.C中。不得增行或删行,也不得更改程序的结构! 给定源程序: #include void fun(unsigned long *n) unsigned long

2、 x=0, i; int t; i=1; while(*n) /*found*/ t=*n % _1_; /*found*/ if(t%2!= _2_) x=x+t*i; i=i*10; *n =*n /10; /*found*/ *n=_3_; main() unsigned long n=-1; while(n99999999|n全国计算机二级 C语言上机试题 1+2015年答案解析(总分:30.00,做题时间:90 分钟)1.给定程序中,函数 fun的功能是:将形参 n所指变量中,各位上为偶数的数去除,剩余的数按原来从高位到低位的顺序组成一个新的数,并通过形参指针 n传回所指变量。 例如

3、输入一个数:27638496,新的数:为 739。 请在程序的下划线处填入正确的内容并把下划线删除, 使程序得出正确的结果。 注意:源程序存放在考生文件夹下的 BLANK1.C中。不得增行或删行,也不得更改程序的结构! 给定源程序: #include void fun(unsigned long *n) unsigned long x=0, i; int t; i=1; while(*n) /*found*/ t=*n % _1_; /*found*/ if(t%2!= _2_) x=x+t*i; i=i*10; *n =*n /10; /*found*/ *n=_3_; main() unsigned long n=-1; while(n99999999|n

展开阅读全文
相关资源
猜你喜欢
  • DIN 51045-5-2007 Determination of linear change of solids by thermal effect using the dilatometer method - Part 5 Testing of non-fired heavy ceramic materials《利用膨胀计方法测定热效应引起的固体线性变化.pdf DIN 51045-5-2007 Determination of linear change of solids by thermal effect using the dilatometer method - Part 5 Testing of non-fired heavy ceramic materials《利用膨胀计方法测定热效应引起的固体线性变化.pdf
  • DIN 51060-2000 Refractory ceramic raw materials and refractories - Definitions of the terms refractory high refractory《耐火陶瓷原材料和耐火产品 耐火及高级耐火材料的术语定义》.pdf DIN 51060-2000 Refractory ceramic raw materials and refractories - Definitions of the terms refractory high refractory《耐火陶瓷原材料和耐火产品 耐火及高级耐火材料的术语定义》.pdf
  • DIN 51061-2017 Testing of ceramic raw and finished materials - Sampling of ceramic raw materials《陶瓷原材料和成品的检验 陶瓷原材料的抽样》.pdf DIN 51061-2017 Testing of ceramic raw and finished materials - Sampling of ceramic raw materials《陶瓷原材料和成品的检验 陶瓷原材料的抽样》.pdf
  • DIN 51061-3-1973 Testing of ceramic raw and finished materials sampling refractory bricks《陶瓷原材料和成品材料的检验 第3部分 耐火砖取样》.pdf DIN 51061-3-1973 Testing of ceramic raw and finished materials sampling refractory bricks《陶瓷原材料和成品材料的检验 第3部分 耐火砖取样》.pdf
  • DIN 51068-2008 Testing of ceramic raw and basic materials - Determination of resistance to thermal shock - Water quenching method for refractory bricks《陶瓷原材料和基本材料的测试 耐热冲击性的测定 耐火砖用水.pdf DIN 51068-2008 Testing of ceramic raw and basic materials - Determination of resistance to thermal shock - Water quenching method for refractory bricks《陶瓷原材料和基本材料的测试 耐热冲击性的测定 耐火砖用水.pdf
  • DIN 5107-1992 Blacksmith- chisels (cold chisels)《锻工凿(冷凿)》.pdf DIN 5107-1992 Blacksmith- chisels (cold chisels)《锻工凿(冷凿)》.pdf
  • DIN 51078-2002 Testing of ceramic materials - Preparation of samples for the determination of change of mass during drying and for chemical analysis《陶瓷原材料和材料的检验 干燥时质量变化测定用和化学分析用试样制.pdf DIN 51078-2002 Testing of ceramic materials - Preparation of samples for the determination of change of mass during drying and for chemical analysis《陶瓷原材料和材料的检验 干燥时质量变化测定用和化学分析用试样制.pdf
  • DIN 5108-1992 Masons- hammers《泥瓦工用锤》.pdf DIN 5108-1992 Masons- hammers《泥瓦工用锤》.pdf
  • DIN 51081-2002 Testing of oxidic raw materials and materials - Determination of change in mass on ignition《氧化原料和材料的检验 燃烧时质量变化的测定》.pdf DIN 51081-2002 Testing of oxidic raw materials and materials - Determination of change in mass on ignition《氧化原料和材料的检验 燃烧时质量变化的测定》.pdf
  • 相关搜索

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

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