【计算机类职业资格】全国计算机二级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 EN 15643-4-2012 Sustainability of construction works - Assessment of buildings - Part 4 Framework for the assessment of economic performance German version EN 15643-4 2012《建筑工程.pdf DIN EN 15643-4-2012 Sustainability of construction works - Assessment of buildings - Part 4 Framework for the assessment of economic performance German version EN 15643-4 2012《建筑工程.pdf
  • DIN EN 15644-2009 Traditionally designed prefabricated stairs made of solid wood - Specifications and requirements German version EN 15644 2008《实心木制传统设计型预制楼梯 规范和要求》.pdf DIN EN 15644-2009 Traditionally designed prefabricated stairs made of solid wood - Specifications and requirements German version EN 15644 2008《实心木制传统设计型预制楼梯 规范和要求》.pdf
  • DIN EN 15646-2009 Electrodeposited coatings - Electroplated coatings of aluminium and aluminium alloys with supplementary treatment - Requirements and test methods English version .pdf DIN EN 15646-2009 Electrodeposited coatings - Electroplated coatings of aluminium and aluminium alloys with supplementary treatment - Requirements and test methods English version .pdf
  • DIN EN 15647-2009 Surface active agents - Determination of the dispersing effect of surfactants on powder English version of DIN EN 15647 2009-04《表面活性剂 表面活性剂在粉体中的分散效果测定》.pdf DIN EN 15647-2009 Surface active agents - Determination of the dispersing effect of surfactants on powder English version of DIN EN 15647 2009-04《表面活性剂 表面活性剂在粉体中的分散效果测定》.pdf
  • DIN EN 15648-2009 Thermal spraying - Component related procedure qualification English version of DIN EN 15648 2009-04《热喷涂与程序验证有关的部件》.pdf DIN EN 15648-2009 Thermal spraying - Component related procedure qualification English version of DIN EN 15648 2009-04《热喷涂与程序验证有关的部件》.pdf
  • DIN EN 1565-1-1999 en 5012 Plastics piping systems for soil and waste discharge (low and high temperature) within the building structure - Styrene copolymer blends (SAN+PVC) - Part.pdf DIN EN 1565-1-1999 en 5012 Plastics piping systems for soil and waste discharge (low and high temperature) within the building structure - Styrene copolymer blends (SAN+PVC) - Part.pdf
  • DIN EN 15650-2010 Ventilation for buildings - Fire dampers German version EN 15650 2010《建筑物通风设备 防火挡板 德文版本EN 15650-2010》.pdf DIN EN 15650-2010 Ventilation for buildings - Fire dampers German version EN 15650 2010《建筑物通风设备 防火挡板 德文版本EN 15650-2010》.pdf
  • DIN EN 15651-1-2017 Sealants for non-structural use in joints in buildings and pedestrian walkways - Part 1 Sealants for facade elements German version EN 15651-1 2017《建筑物和人行道连接处的非.pdf DIN EN 15651-1-2017 Sealants for non-structural use in joints in buildings and pedestrian walkways - Part 1 Sealants for facade elements German version EN 15651-1 2017《建筑物和人行道连接处的非.pdf
  • DIN EN 15651-2-2017 Sealants for non-structural use in joints in buildings and pedestrian walkways - Part 2 Sealants for glazing German version EN 15651-2 2017《建筑物和人行道连接处的非结构用密封剂 第.pdf DIN EN 15651-2-2017 Sealants for non-structural use in joints in buildings and pedestrian walkways - Part 2 Sealants for glazing German version EN 15651-2 2017《建筑物和人行道连接处的非结构用密封剂 第.pdf
  • 相关搜索

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

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