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

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

1、二级 C 语言机试 55 及答案解析(总分:100.00,做题时间:90 分钟)一、B填空题/B(总题数:1,分数:30.00)1.请补充函数 fun(),该函数的功能是:把从主函数中输入的字符串 str2 接在字符串 str1 的后面。 例如:str1“How do”,str2=“you do?”,结果输出:How do you do? 注意:部分源程序给出如下。 请勿改动主函数 main 和其他函数中的任何内容,仅在函数 fun 的横线上填入所编写的若干表达式或语句。试题程序: #includestdioh #includeconioh #define N 40 void fun(char

2、 *str1,char *str2) int i=0; char *p1=str1; char *p2=str2; while(U 【1】 /U) i+; for( ;U 【2】 /U;i+) *(p1+i)=U 【3】 /U; *(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; 解析 本题采用“循环右移”的算法。和我们在前面分析的稍有不同的是,个是整型数组,个是字符型数组。

展开阅读全文
相关资源
猜你喜欢
  • EN 60300-3-4-2008 en Dependability management - Part 3-4 Application guide - Guide to the specification of dependability requirements《可信性管理 第3-4部分 应用指南 制定可信性要求规范的指南》.pdf EN 60300-3-4-2008 en Dependability management - Part 3-4 Application guide - Guide to the specification of dependability requirements《可信性管理 第3-4部分 应用指南 制定可信性要求规范的指南》.pdf
  • EN 60301-2012 en Preferred diameters of wire terminations of capacitors and resistors.pdf EN 60301-2012 en Preferred diameters of wire terminations of capacitors and resistors.pdf
  • EN 60305-1996 en Insulators for Overhead Lines with a Nominal Voltage Above 1 kV Ceramic or Glass Insulator Units for a c Systems Characteristics of Insulator Units of the Cap and .pdf EN 60305-1996 en Insulators for Overhead Lines with a Nominal Voltage Above 1 kV Ceramic or Glass Insulator Units for a c Systems Characteristics of Insulator Units of the Cap and .pdf
  • EN 60308-2005 en Hydraulic turbines Testing of control systems《水轮机 控制系统试验 IEC 60308-2005》.pdf EN 60308-2005 en Hydraulic turbines Testing of control systems《水轮机 控制系统试验 IEC 60308-2005》.pdf
  • EN 60309-1-1999 en Plugs Socket-Outlets and Couplers for Industrial Purposes Part 1 General Requirements (Incorporates Amendment A2 2012)《工业用插头 插座端口和连接件 第1部分 一般要求 包含修改件A11 2004年5月和.pdf EN 60309-1-1999 en Plugs Socket-Outlets and Couplers for Industrial Purposes Part 1 General Requirements (Incorporates Amendment A2 2012)《工业用插头 插座端口和连接件 第1部分 一般要求 包含修改件A11 2004年5月和.pdf
  • EN 60309-2-1999 en Plugs socket-outlets and couplers for industrial purposes - Part 2 Dimensional interchangeability requirements for pin and contact-tube accessories (Incorporates.pdf EN 60309-2-1999 en Plugs socket-outlets and couplers for industrial purposes - Part 2 Dimensional interchangeability requirements for pin and contact-tube accessories (Incorporates.pdf
  • EN 60309-4-2007 en Plugs socket-outlets and couplers for industrial purposes - Part 4 Switched socket-outlets and connectors with or without interlock (Incorporates Amendment A1 20.pdf EN 60309-4-2007 en Plugs socket-outlets and couplers for industrial purposes - Part 4 Switched socket-outlets and connectors with or without interlock (Incorporates Amendment A1 20.pdf
  • EN 60310-2016 en Railway applications - Traction transformers and inductors on board rolling Stock.pdf EN 60310-2016 en Railway applications - Traction transformers and inductors on board rolling Stock.pdf
  • EN 60311-2003 en Electric irons for household or similar use - Methods for measuring performance (Incorporates Amendment A2 2009)《家用或类似用途的电熨斗 测试性能的方法 包含修改件A2-2009》.pdf EN 60311-2003 en Electric irons for household or similar use - Methods for measuring performance (Incorporates Amendment A2 2009)《家用或类似用途的电熨斗 测试性能的方法 包含修改件A2-2009》.pdf
  • 相关搜索
    资源标签

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

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