【计算机类职业资格】二级C语言机试54及答案解析.doc

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

1、二级 C 语言机试 54 及答案解析(总分:100.00,做题时间:90 分钟)一、B填空题/B(总题数:1,分数:30.00)1.请补充函数 fun(),该函数的功能求能整除 x 且是偶数的数,把这些数保存在数组 bb 中,并按从大到小的顺序输出。 例如当 x=20 时,依次输出:20 10 4 2。 注意:部分源程序给出如下。 请勿改动主函数 main 和其他函数中的任何内容,仅在函数 fun()的横线上填入所编写的若干表达式或语句。 试题程序:#includeconioh #includestdioh void fun(int k,int bb ) int i; int j=0; for

2、U 【l】 /U;i=k;i+) if(U 【2】 /U) bbi+=i; printf(“/n/n“); for(i=U 【3】 /U;i=0;i-) printf(“%d“,bbi); main( ) int k=1; int bb100;clrscr( ); printf(“/nPlease input X=“); scanf(“%d“,i=0;i-) printf(“%d“,bbi); main( ) int k=1; int bb100;clrscr( ); printf(“/nPlease input X=“); scanf(“%d“,ik;i=i+2) /*将 s 所指字符串中下标为偶数的字符存入 t 所指字符串中*/ tj+=si; tj=/0; /*在字符串最后加上结束标志*/ 解析 本题使用了一种 i 永远是偶数的循环方法,即for(i=0;ik;i=i+2),因为开始时 i 的值为 0,当 i+2 循环时,此值永远是偶数。

展开阅读全文
相关资源
猜你喜欢
  • ASTM F2452-2004(2012) Standard Practice for Determining the Adhesion of Print Media Utilizing Mechanical Stress Two Different Test MethodsScore Tape and Cross Hatch《使用机械应力测定印刷介质附着力.pdf ASTM F2452-2004(2012) Standard Practice for Determining the Adhesion of Print Media Utilizing Mechanical Stress Two Different Test MethodsScore Tape and Cross Hatch《使用机械应力测定印刷介质附着力.pdf
  • ASTM F2453 F2453M-2005 Standard Specification for Welded Wire Mesh Fence Fabric (Metallic-Coated or Polymer Coated) for Meshes of 6 in 2 [3871 mm2] or Less in Panels or Rolls with .pdf ASTM F2453 F2453M-2005 Standard Specification for Welded Wire Mesh Fence Fabric (Metallic-Coated or Polymer Coated) for Meshes of 6 in 2 [3871 mm2] or Less in Panels or Rolls with .pdf
  • ASTM F2453 F2453M-2005(2011)e1 Standard Specification for Welded Wire Mesh Fence Fabric (Metallic-Coated or Polymer Coated) for Meshes of 6 in 2 [3871 mm2] or Less in Panels or Rol.pdf ASTM F2453 F2453M-2005(2011)e1 Standard Specification for Welded Wire Mesh Fence Fabric (Metallic-Coated or Polymer Coated) for Meshes of 6 in 2 [3871 mm2] or Less in Panels or Rol.pdf
  • ASTM F2453 F2453M-2014 Standard Specification for Welded Wire Mesh Fence Fabric &40 Metallic-Coated or Polymer Coated&41 for Meshes of 6 in 2&8201 [3871 mm2] or Less in Panels or R.pdf ASTM F2453 F2453M-2014 Standard Specification for Welded Wire Mesh Fence Fabric &40 Metallic-Coated or Polymer Coated&41 for Meshes of 6 in 2&8201 [3871 mm2] or Less in Panels or R.pdf
  • ASTM F2454-2005 Standard Practice for Sealing Lateral Connections and lines from the mainline Sewer Systems by the Lateral Packer Method Using Chemical Grouting《用化学灌浆的侧向灌浆机法密封测量连接件.pdf ASTM F2454-2005 Standard Practice for Sealing Lateral Connections and lines from the mainline Sewer Systems by the Lateral Packer Method Using Chemical Grouting《用化学灌浆的侧向灌浆机法密封测量连接件.pdf
  • ASTM F2454-2005(2010) Standard Practice for Sealing Lateral Connections and lines from the mainline Sewer Systems by the Lateral Packer Method Using Chemical Grouting《用化学灌浆的侧向灌浆机法密.pdf ASTM F2454-2005(2010) Standard Practice for Sealing Lateral Connections and lines from the mainline Sewer Systems by the Lateral Packer Method Using Chemical Grouting《用化学灌浆的侧向灌浆机法密.pdf
  • ASTM F2454-2005(2016)e1 Standard Practice for Sealing Lateral Connections and lines from the mainline Sewer Systems by the Lateral Packer Method Using Chemical Grouting《使用化学灌浆通过侧向封.pdf ASTM F2454-2005(2016)e1 Standard Practice for Sealing Lateral Connections and lines from the mainline Sewer Systems by the Lateral Packer Method Using Chemical Grouting《使用化学灌浆通过侧向封.pdf
  • ASTM F2456-2004 Standard Specification for Youth-Resistant Firearms Containers (YRFCs)《防止青少年使用的武器箱(YRFCs)的标准规范》.pdf ASTM F2456-2004 Standard Specification for Youth-Resistant Firearms Containers (YRFCs)《防止青少年使用的武器箱(YRFCs)的标准规范》.pdf
  • ASTM F2456-2004(2009) Standard Specification for Youth-Resistant Firearms Containers (YRFCs)《防止青少年使用的武器箱(YRFCs)的标准规范》.pdf ASTM F2456-2004(2009) Standard Specification for Youth-Resistant Firearms Containers (YRFCs)《防止青少年使用的武器箱(YRFCs)的标准规范》.pdf
  • 相关搜索

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

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