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

上传人:ideacase155 文档编号:1325799 上传时间:2019-10-17 格式:DOC 页数:6 大小:31KB
下载 相关 举报
【计算机类职业资格】二级C语言机试-95及答案解析.doc_第1页
第1页 / 共6页
【计算机类职业资格】二级C语言机试-95及答案解析.doc_第2页
第2页 / 共6页
【计算机类职业资格】二级C语言机试-95及答案解析.doc_第3页
第3页 / 共6页
【计算机类职业资格】二级C语言机试-95及答案解析.doc_第4页
第4页 / 共6页
【计算机类职业资格】二级C语言机试-95及答案解析.doc_第5页
第5页 / 共6页
点击查看更多>>
资源描述

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

2、)if( 【2】 )bbi+=i;printf(“/n/n“);for(i= 【3】 ;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 循环时,此值永远是偶数。

展开阅读全文
相关资源
猜你喜欢
  • ETSI TS 121 111-2017 Universal Mobile Telecommunications System (UMTS) LTE USIM and IC card requirements (V14 1 0 3GPP TS 21 111 version 14 1 0 Release 14).pdf ETSI TS 121 111-2017 Universal Mobile Telecommunications System (UMTS) LTE USIM and IC card requirements (V14 1 0 3GPP TS 21 111 version 14 1 0 Release 14).pdf
  • ETSI TS 121 111-2018 Universal Mobile Telecommunications System (UMTS) LTE USIM and IC card requirements (V15 1 1 3GPP TS 21 111 version 15 1 1 Release 15).pdf ETSI TS 121 111-2018 Universal Mobile Telecommunications System (UMTS) LTE USIM and IC card requirements (V15 1 1 3GPP TS 21 111 version 15 1 1 Release 15).pdf
  • ETSI TS 121 133-2001 Universal Mobile Telecommunications System (UMTS) 3G Security Security Threats and Requirements (3G TS 21 133 Version 3 2 0 Release 1999)《全球移动通信系统(UMTS) 3G安全 安.pdf ETSI TS 121 133-2001 Universal Mobile Telecommunications System (UMTS) 3G Security Security Threats and Requirements (3G TS 21 133 Version 3 2 0 Release 1999)《全球移动通信系统(UMTS) 3G安全 安.pdf
  • ETSI TS 121 133-2001 Universal Mobile Telecommunications System (UMTS) 3G Security Security Threats and Requirements (3G TS 21 133 Version 3 2 0 Release 1999)《全球移动通信系统(UMTS) 3G安全 安_1.pdf ETSI TS 121 133-2001 Universal Mobile Telecommunications System (UMTS) 3G Security Security Threats and Requirements (3G TS 21 133 Version 3 2 0 Release 1999)《全球移动通信系统(UMTS) 3G安全 安_1.pdf
  • ETSI TS 121 201-2016 LTE Technical Specifications and Technical Reports for an Evolved Packet System (EPS) based 3GPP system (V12 0 0 3GPP TS 21 201 version 12 0 0 Release 12)《长期演进.pdf ETSI TS 121 201-2016 LTE Technical Specifications and Technical Reports for an Evolved Packet System (EPS) based 3GPP system (V12 0 0 3GPP TS 21 201 version 12 0 0 Release 12)《长期演进.pdf
  • ETSI TS 121 201-2017 LTE Technical Specifications and Technical Reports for an Evolved Packet System (EPS) based 3GPP system (V14 1 0 3GPP TS 21 201 version 14 1 0 Release 14)《长期演进.pdf ETSI TS 121 201-2017 LTE Technical Specifications and Technical Reports for an Evolved Packet System (EPS) based 3GPP system (V14 1 0 3GPP TS 21 201 version 14 1 0 Release 14)《长期演进.pdf
  • ETSI TS 121 201-2018 LTE Technical Specifications and Technical Reports for an Evolved Packet System (EPS) based 3GPP system (V15 0 0 3GPP TS 21 201 version 15 0 0 Release 15).pdf ETSI TS 121 201-2018 LTE Technical Specifications and Technical Reports for an Evolved Packet System (EPS) based 3GPP system (V15 0 0 3GPP TS 21 201 version 15 0 0 Release 15).pdf
  • ETSI TS 121 202-2016 Digital cellular telecommunications system (Phase 2+)(GSM) Universal Mobile Telecommunications System (UMTS) LTE Technical Specifications and Technical Reports.pdf ETSI TS 121 202-2016 Digital cellular telecommunications system (Phase 2+)(GSM) Universal Mobile Telecommunications System (UMTS) LTE Technical Specifications and Technical Reports.pdf
  • ETSI TS 121 202-2017 Digital cellular telecommunications system (Phase 2+) (GSM) Universal Mobile Telecommunications System (UMTS) LTE Technical Specifications and Technical Report.pdf ETSI TS 121 202-2017 Digital cellular telecommunications system (Phase 2+) (GSM) Universal Mobile Telecommunications System (UMTS) LTE Technical Specifications and Technical Report.pdf
  • 相关搜索

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

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