【计算机类职业资格】二级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;)解析:解析 本题采用“循环右移”的算法。和我们在前面分析的稍有不同的是,个是整型数组,个是字符型数组。

展开阅读全文
相关资源
猜你喜欢
  • NF S76-036-1997 Respiratory protective devices - Self-contained closed-circuit breathing apparatus compressed oxygen or compressed oxygen-nitrogen type - Requirements testing marki.pdf NF S76-036-1997 Respiratory protective devices - Self-contained closed-circuit breathing apparatus compressed oxygen or compressed oxygen-nitrogen type - Requirements testing marki.pdf
  • NF S76-037-1995 Respiratory protective devices Powered fresh air hose breathing apparatus incorporating a hood Requirements testing marking 《呼吸保护设备 助力新鲜空气软管带罩呼吸仪 要求、试验、标记》.pdf NF S76-037-1995 Respiratory protective devices Powered fresh air hose breathing apparatus incorporating a hood Requirements testing marking 《呼吸保护设备 助力新鲜空气软管带罩呼吸仪 要求、试验、标记》.pdf
  • NF S77-100-1972 PROTECTION OF THE EYE AGAINST HARMFUL RADIATION 《有害辐射的眼睛防护》.pdf NF S77-100-1972 PROTECTION OF THE EYE AGAINST HARMFUL RADIATION 《有害辐射的眼睛防护》.pdf
  • NF S77-107-1995 Personal eye protection - Sunglare filters for industrial use 《个人眼睛保护 工业用太阳强光滤波器》.pdf NF S77-107-1995 Personal eye protection - Sunglare filters for industrial use 《个人眼睛保护 工业用太阳强光滤波器》.pdf
  • NF S77-126-1999 Screens for laser working places Safety requirements and testing 《激光工作场所用屏蔽物 安全要求和试验》.pdf NF S77-126-1999 Screens for laser working places Safety requirements and testing 《激光工作场所用屏蔽物 安全要求和试验》.pdf
  • NF S80-501-1995 Horology Corrected cylcloidal or involute toothing gears Preferred modules 《钟表业 校准式摆线或渐开线齿轮 优选模数》.pdf NF S80-501-1995 Horology Corrected cylcloidal or involute toothing gears Preferred modules 《钟表业 校准式摆线或渐开线齿轮 优选模数》.pdf
  • NF S80-504-1995 Horology Corrected cycloidal or involute toothing gears Toothing for coupled gears 《钟表业 校准式摆线或渐开线齿轮 耦合齿轮的齿连接》.pdf NF S80-504-1995 Horology Corrected cycloidal or involute toothing gears Toothing for coupled gears 《钟表业 校准式摆线或渐开线齿轮 耦合齿轮的齿连接》.pdf
  • NF S80-505-1995 Horology Corrected cycloidal or involute toothing gears Toothing for trains of gears 《钟表业 校准式摆线或渐开线齿轮 齿轮组的齿连接》.pdf NF S80-505-1995 Horology Corrected cycloidal or involute toothing gears Toothing for trains of gears 《钟表业 校准式摆线或渐开线齿轮 齿轮组的齿连接》.pdf
  • NF S80-525-1995 Horology Corrected cycloidal toothing gears Step up gears Basic profiles Driving gear and driven gear 《钟表业 校准式摆线齿轮 增速齿轮 基本型面 主动轮和从动轮》.pdf NF S80-525-1995 Horology Corrected cycloidal toothing gears Step up gears Basic profiles Driving gear and driven gear 《钟表业 校准式摆线齿轮 增速齿轮 基本型面 主动轮和从动轮》.pdf
  • 相关搜索

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

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