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

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

二级 C 语言机试-180 及答案解析(总分:100.00,做题时间:90 分钟)一、填空题(总题数:1,分数:33.00)1.请补充函数 fun(),该函数的功能是:把从主函数中输入的字符串 str2 接在字符串 str1 的后面。例如:str1“How do”,str2=“you do?”,结果输出:How do you do?注意:部分源程序给出如下。请勿改动主函数 main 和其他函数中的任何内容,仅在函数 fun 的横线上填入所编写的若干表达式或语句。试题程序:#includestdioh#includeconioh#define N 40void fun(char *str1,char *str2)int i=0;char *p1=str1;char *p2=str2;while( 【1】 )i+;for( ; 【2】 ;i+)*(p1+i)= 【3】 ;*(p1+i)=/0;main()char str1N,str2N);clrscr();printf(“*Input the string str1 i=n-1;i+) /*循环右移 n-p 次*/t=wn-11;for(j=n-2;j=0;j-) /*实现循环右移*/wj+1=wj;w0=t;)解析:解析 本题采用“循环右移”的算法。和我们在前面分析的稍有不同的是,个是整型数组,个是字符型数组。

展开阅读全文
相关资源
猜你喜欢
  • ASTM A973 A973M-2007(2012) Standard Specification for Grade 100 Alloy Steel Chain《100级合金钢链标准规格》.pdf ASTM A973 A973M-2007(2012) Standard Specification for Grade 100 Alloy Steel Chain《100级合金钢链标准规格》.pdf
  • ASTM A974-1997(2003) Standard Specification for Welded Wire Fabric Gabions and Gabion Mattresses (Metallic Coated or Polyvinyl Chloride (PVC) Coated)《焊线纤维金属筐和金属丝网的标准规范 (金属涂层或聚氯乙烯(P.pdf ASTM A974-1997(2003) Standard Specification for Welded Wire Fabric Gabions and Gabion Mattresses (Metallic Coated or Polyvinyl Chloride (PVC) Coated)《焊线纤维金属筐和金属丝网的标准规范 (金属涂层或聚氯乙烯(P.pdf
  • ASTM A974-1997(2011) Standard Specification for Welded Wire Fabric Gabions and Gabion Mattresses (Metallic Coated or Polyvinyl Chloride (PVC) Coated)《焊线纤维金属筐和金属丝网的标准规格 (金属涂层或聚氯乙烯(P.pdf ASTM A974-1997(2011) Standard Specification for Welded Wire Fabric Gabions and Gabion Mattresses (Metallic Coated or Polyvinyl Chloride (PVC) Coated)《焊线纤维金属筐和金属丝网的标准规格 (金属涂层或聚氯乙烯(P.pdf
  • ASTM A974-1997(2016) Standard Specification for Welded Wire Fabric Gabions and Gabion Mattresses (Metallic-Coated or Polyvinyl Chloride (PVC) Coated)《焊接钢丝网笼和网垫 (金属涂覆或者聚氯乙烯 (PVC) 涂覆.pdf ASTM A974-1997(2016) Standard Specification for Welded Wire Fabric Gabions and Gabion Mattresses (Metallic-Coated or Polyvinyl Chloride (PVC) Coated)《焊接钢丝网笼和网垫 (金属涂覆或者聚氯乙烯 (PVC) 涂覆.pdf
  • ASTM A975-1997(2003) Standard Specification for Double-Twisted Hexagonal Mesh Gabions and Revet Mattresses (Metallic-Coated Steel Wire or Metallic-Coated Steel Wire With Poly(Vinyl.pdf ASTM A975-1997(2003) Standard Specification for Double-Twisted Hexagonal Mesh Gabions and Revet Mattresses (Metallic-Coated Steel Wire or Metallic-Coated Steel Wire With Poly(Vinyl.pdf
  • ASTM A975-2011 Standard Specification for Double&x2013 Twisted Hexagonal Mesh Gabions and Revet Mattresses (Metallic-Coated Steel Wire or Metallic-Coated Steel Wire With Poly(Vinyl.pdf ASTM A975-2011 Standard Specification for Double&x2013 Twisted Hexagonal Mesh Gabions and Revet Mattresses (Metallic-Coated Steel Wire or Metallic-Coated Steel Wire With Poly(Vinyl.pdf
  • ASTM A975-2011(2016) Standard Specification for Double&ndash Twisted Hexagonal Mesh Gabions and Revet Mattresses (Metallic-Coated Steel Wire or Metallic-Coated Steel Wire With Poly.pdf ASTM A975-2011(2016) Standard Specification for Double&ndash Twisted Hexagonal Mesh Gabions and Revet Mattresses (Metallic-Coated Steel Wire or Metallic-Coated Steel Wire With Poly.pdf
  • ASTM A976-2003 Standard Classification of Insulating Coatings by Composition Relative Insulating Ability and Application《与绝缘能力和应用相关的复合绝缘涂层的标准分类》.pdf ASTM A976-2003 Standard Classification of Insulating Coatings by Composition Relative Insulating Ability and Application《与绝缘能力和应用相关的复合绝缘涂层的标准分类》.pdf
  • ASTM A976-2003(2008) Standard Classification of Insulating Coatings by Composition Relative Insulating Ability and Application《与绝缘能力和应用相关的复合绝缘涂层的标准分类》.pdf ASTM A976-2003(2008) Standard Classification of Insulating Coatings by Composition Relative Insulating Ability and Application《与绝缘能力和应用相关的复合绝缘涂层的标准分类》.pdf
  • 相关搜索

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

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