[计算机类试卷]国家二级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);

展开阅读全文
相关资源
猜你喜欢
  • ASTM D5890-2006 Standard Test Method for Swell Index of Clay Mineral Component of Geosynthetic Clay Liners《土工合成织物粘土衬的粘土矿物成分膨胀指数的标准试验方法》.pdf ASTM D5890-2006 Standard Test Method for Swell Index of Clay Mineral Component of Geosynthetic Clay Liners《土工合成织物粘土衬的粘土矿物成分膨胀指数的标准试验方法》.pdf
  • ASTM D5890-2011 4093 Standard Test Method for Swell Index of Clay Mineral Component of Geosynthetic Clay Liners《土工合成材料粘土衬垫的粘土矿物成分膨胀指数的标准试验方法》.pdf ASTM D5890-2011 4093 Standard Test Method for Swell Index of Clay Mineral Component of Geosynthetic Clay Liners《土工合成材料粘土衬垫的粘土矿物成分膨胀指数的标准试验方法》.pdf
  • ASTM D5890-2018 8125 Standard Test Method for Swell Index of Clay Mineral Component of Geosynthetic Clay Liners.pdf ASTM D5890-2018 8125 Standard Test Method for Swell Index of Clay Mineral Component of Geosynthetic Clay Liners.pdf
  • ASTM D5891 D5891M-2002(2016)e1 4441 Standard Test Method for Fluid Loss of Clay Component of Geosynthetic Clay Liners《土工合成粘土衬的粘土成分流体损失的标准试验方法》.pdf ASTM D5891 D5891M-2002(2016)e1 4441 Standard Test Method for Fluid Loss of Clay Component of Geosynthetic Clay Liners《土工合成粘土衬的粘土成分流体损失的标准试验方法》.pdf
  • ASTM D5891-2002 Standard Test Method for Fluid Loss of Clay Component of Geosynthetic Clay Liners《土工合成粘土衬的粘土成分流失的标准试验方法》.pdf ASTM D5891-2002 Standard Test Method for Fluid Loss of Clay Component of Geosynthetic Clay Liners《土工合成粘土衬的粘土成分流失的标准试验方法》.pdf
  • ASTM D5891-2002(2009) 6250 Standard Test Method for Fluid Loss of Clay Component of Geosynthetic Clay Liners《土工合成粘土衬的粘土成分流失的标准试验方法》.pdf ASTM D5891-2002(2009) 6250 Standard Test Method for Fluid Loss of Clay Component of Geosynthetic Clay Liners《土工合成粘土衬的粘土成分流失的标准试验方法》.pdf
  • ASTM D5893 D5893M-2010 5000 Standard Specification for Cold Applied Single Component Chemically Curing Silicone Joint Sealant for Portland Cement Concrete Pavements《波特兰水泥混凝土铺面用冷施单组.pdf ASTM D5893 D5893M-2010 5000 Standard Specification for Cold Applied Single Component Chemically Curing Silicone Joint Sealant for Portland Cement Concrete Pavements《波特兰水泥混凝土铺面用冷施单组.pdf
  • ASTM D5893 D5893M-2016 4317 Standard Specification for Cold Applied Single Component Chemically Curing Silicone Joint Sealant for Portland Cement Concrete Pavements《硅酸盐水泥混凝土筑路用冷涂敷单.pdf ASTM D5893 D5893M-2016 4317 Standard Specification for Cold Applied Single Component Chemically Curing Silicone Joint Sealant for Portland Cement Concrete Pavements《硅酸盐水泥混凝土筑路用冷涂敷单.pdf
  • ASTM D5893-2004 Standard Specification for Cold Applied Single Component Chemically Curing Silicone Joint Sealant for Portland Cement Concrete Pavements《硅酸盐水泥混凝土路面用冷铺的单一成分、化学固化硅酮接缝.pdf ASTM D5893-2004 Standard Specification for Cold Applied Single Component Chemically Curing Silicone Joint Sealant for Portland Cement Concrete Pavements《硅酸盐水泥混凝土路面用冷铺的单一成分、化学固化硅酮接缝.pdf
  • 相关搜索

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

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