[计算机类试卷]国家二级C语言机试(操作题)模拟试卷357(无答案).doc

上传人:medalangle361 文档编号:846912 上传时间:2019-02-21 格式:DOC 页数:3 大小:31KB
下载 相关 举报
[计算机类试卷]国家二级C语言机试(操作题)模拟试卷357(无答案).doc_第1页
第1页 / 共3页
[计算机类试卷]国家二级C语言机试(操作题)模拟试卷357(无答案).doc_第2页
第2页 / 共3页
[计算机类试卷]国家二级C语言机试(操作题)模拟试卷357(无答案).doc_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

1、国家二级 C 语言机试(操作题)模拟试卷 357(无答案)一、程序填空题1 给定程序中,函数 fun 的功能是:判定形参 a 所指的 NxN(规定 N 为奇数)的矩阵是否是“ 幻方” ,若是,函数返回值为 1;不是,函数返回值为 0。“幻方”的判定条件是:矩阵每行、每列、主对角线及反对角线上元素之和都相等。例如,以下 33 的矩阵就是一个“ 幻方”:4 9 23 5 78 1 6请在程序的下划线处填入正确的内容并把下划线删除,使程序得出正确的结果。注意:源程序存放在考生文件夹下的 BLANK1C 中。不得增行或删行,也不得更改程序的结构!#include #define N 3int fun

2、int (*a) N ) int i,j ,ml,m2,row,colum;ml=m2=0; j=Nil; m1+=ai i; m2+=if (ml ! =m2) return 0;row=colum=_1_ ; row+=a i j ; colum+=a j if (row ! =colum) _2_ (row! =ml)return 0;/*found*/ return _3_;main ()printf(“Enter number for array:for(j=0; j#include void fun(char *str)main ()char str 81 ;void NONO

3、) ;printf (“Input a string:“);gets (str);puts (str);fun (str);printf(* str: oosn“,str);NONO();void NONO ()/*请在此函数内打开文件,输入调试数据,调用 fun 函数,输出数据,关闭文件。 */char str81;int n = 0;FILE *rf, *wf ;rf= fopen(“indat“ ,“r“);wf = fopen (“outdat“, “w“);while(n 10) fgets (str, 80, rf);fun (str);fprintf (wf, “s“, str);n+ ;fclose (rf);fclose (wf);

展开阅读全文
相关资源
猜你喜欢
  • BS ISO 6405-1-2017 en_8539  Earth-moving machinery Symbols for operator controls and other displays Common symbols《运土机械.操作者控制符号和其他标记.通用符号》.pdf BS ISO 6405-1-2017 en_8539 Earth-moving machinery Symbols for operator controls and other displays Common symbols《运土机械.操作者控制符号和其他标记.通用符号》.pdf
  • BS ISO 6405-2-2017 en_2199  Earth-moving machinery Symbols for operator controls and other displays Symbols for specific machines equipment and accessories《运土机械.操作者控制符号和其他标记.专用机器、设备和附件符号》.pdf BS ISO 6405-2-2017 en_2199 Earth-moving machinery Symbols for operator controls and other displays Symbols for specific machines equipment and accessories《运土机械.操作者控制符号和其他标记.专用机器、设备和附件符号》.pdf
  • BS ISO 6415-2005 en_8794  Internal combustion engines - Spin-on filters for lubricating oil - Dimensions《内燃机.润滑油用旋压式过滤器.尺寸》.pdf BS ISO 6415-2005 en_8794 Internal combustion engines - Spin-on filters for lubricating oil - Dimensions《内燃机.润滑油用旋压式过滤器.尺寸》.pdf
  • BS ISO 6420-2016 en_5180  Hydrometry Position fixing equipment for hydrometric boats《水文测量 水文测船的定位设备》.pdf BS ISO 6420-2016 en_5180 Hydrometry Position fixing equipment for hydrometric boats《水文测量 水文测船的定位设备》.pdf
  • BS ISO 6421-2012 en_3445  Hydrometry Methods for assessment of reservoir sedimentation《液体比重测量法.水库淤积评定方法》.pdf BS ISO 6421-2012 en_3445 Hydrometry Methods for assessment of reservoir sedimentation《液体比重测量法.水库淤积评定方法》.pdf
  • BS ISO 6446-1996 en_2719  Rubber products - Bridge bearings - Specification for rubber materials《橡胶制品.桥式承载架.橡胶材料规范》.pdf BS ISO 6446-1996 en_2719 Rubber products - Bridge bearings - Specification for rubber materials《橡胶制品.桥式承载架.橡胶材料规范》.pdf
  • BS ISO 6452-2007 en_8646  Rubber- or plastics-coated fabrics - Determination of fogging characteristics of trim materials in the interior of automobiles《橡胶或塑料涂层织物.汽车内装饰材料雾气凝结特征的测定》.pdf BS ISO 6452-2007 en_8646 Rubber- or plastics-coated fabrics - Determination of fogging characteristics of trim materials in the interior of automobiles《橡胶或塑料涂层织物.汽车内装饰材料雾气凝结特征的测定》.pdf
  • BS ISO 6460-2-2014 en_5053  Motorcycles Measurement method for gaseous exhaust emissions and fuel consumption Test cycles and specific test conditions《摩托车.废气排放和燃料消耗测量方法.试验车和特殊试验条件》.pdf BS ISO 6460-2-2014 en_5053 Motorcycles Measurement method for gaseous exhaust emissions and fuel consumption Test cycles and specific test conditions《摩托车.废气排放和燃料消耗测量方法.试验车和特殊试验条件》.pdf
  • BS ISO 6462-2011 en_4443  Face and shoulder milling cutters with indexable inserts Dimensions《可转位面铣刀和肩铣刀.尺寸规格》.pdf BS ISO 6462-2011 en_4443 Face and shoulder milling cutters with indexable inserts Dimensions《可转位面铣刀和肩铣刀.尺寸规格》.pdf
  • 相关搜索

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

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