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

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

1、国家二级 C 语言机试(操作题)模拟试卷 359(无答案)一、程序填空题1 函数 fun 的功能是:把形参 a 所指数组中的偶数按原顺序依次存放到 a0,a1、a2、中,把奇数从数组中删除,偶数个数通过函数值返回。例如:若 a 所指数组中的数据最初排列为:9、1、4、2、3、6、5、8、7,删除奇数后 a 所指数组中的数据为: 4、2、6、8,返回值为 4。请在程序的下划线处填入正确的内容并把下划线删除,使程序得出正确的结果。注意:源程序存放在考生文件夹下的 BLANK1C 中。不得增行或删行,也不得更改程序的结构!#include #define N 9int fun (int a, int

2、 n) int i,j;j = 0;for(i=0;ivoici fun (char *a,int n)main()char s81; int n;void NONO ();printf (“Enter a string:n“);gets (s);printf (“Enter n:“);scanf(“d“, &n);fun (s,n) ;printf( “The string after deleted:n“);puts(s);NONO();void NONO()/*本函数用于打开文件,输入数据,调用函数,输出数据,关闭文件。 */FILE *in, *out ;int i, n ; char sl81;in= fopen (“indat“,“r“) ;out = fopen (“outdat“,“w“);for (i= 0 ; i 10 ; i+) fscanf (in, “s“,s);fscanf (in, “d“,n);fun (s,n) ;fprintf (out, “sn“,s) ;fclose (in);fclose (out);

展开阅读全文
相关资源
猜你喜欢
  • DIN IEC 60883-1989 Measuring method for chrominance signal-to-random noise ratio for video tape recorders identical with IEC 60883 1987《录象带色度信号与随机噪声之比的测定方法》.pdf DIN IEC 60883-1989 Measuring method for chrominance signal-to-random noise ratio for video tape recorders identical with IEC 60883 1987《录象带色度信号与随机噪声之比的测定方法》.pdf
  • DIN IEC 60914-1990 Conference systems electrical and audio requirements identical with IEC 60914 1988《电话会议电气及音响设备要求》.pdf DIN IEC 60914-1990 Conference systems electrical and audio requirements identical with IEC 60914 1988《电话会议电气及音响设备要求》.pdf
  • DIN IEC 60944-1995 Guide for the maintenance of silicone transformer liquids identical with IEC 60944 1988《硅酮变压器油维护指南》.pdf DIN IEC 60944-1995 Guide for the maintenance of silicone transformer liquids identical with IEC 60944 1988《硅酮变压器油维护指南》.pdf
  • DIN IEC 60946-1991 Binary direct voltage signals for process measurement and control systems identical with IEC 60946 1988《过程测量和控制装置的二元直流电压信号》.pdf DIN IEC 60946-1991 Binary direct voltage signals for process measurement and control systems identical with IEC 60946 1988《过程测量和控制装置的二元直流电压信号》.pdf
  • DIN IEC 60963-1996 Specification for unused polybutenes (IEC 60963 1988) German version HD 582 S1 1991《未用过的聚丁烯规范》.pdf DIN IEC 60963-1996 Specification for unused polybutenes (IEC 60963 1988) German version HD 582 S1 1991《未用过的聚丁烯规范》.pdf
  • DIN IEC 61019-3-1993 Surface acoustic wave (SAW) resonators part 3 standard outlines and lead connections identical with IEC 61019-3 1991《表面声波(SAW)谐振器 第3部分 标准外形和引线连接》.pdf DIN IEC 61019-3-1993 Surface acoustic wave (SAW) resonators part 3 standard outlines and lead connections identical with IEC 61019-3 1991《表面声波(SAW)谐振器 第3部分 标准外形和引线连接》.pdf
  • DIN IEC 61020-2-1-1994 Electromechanical switches for use in electronic equipment part 2 sectional specification for rotary switches section 1 blank detail specification identical .pdf DIN IEC 61020-2-1-1994 Electromechanical switches for use in electronic equipment part 2 sectional specification for rotary switches section 1 blank detail specification identical .pdf
  • DIN IEC 61020-2-1994 Electromechanical switches for use in electronic equipment part 2 sectional specification for rotary switches identical with IEC 61020-2 1991《电子设备的机电开关 第2部分 旋转.pdf DIN IEC 61020-2-1994 Electromechanical switches for use in electronic equipment part 2 sectional specification for rotary switches identical with IEC 61020-2 1991《电子设备的机电开关 第2部分 旋转.pdf
  • DIN IEC 61020-3-1-1994 Electromechanical switches for use in electronic equipment part 3 sectional specification for in-line package switches section 1 blank detail specification i.pdf DIN IEC 61020-3-1-1994 Electromechanical switches for use in electronic equipment part 3 sectional specification for in-line package switches section 1 blank detail specification i.pdf
  • 相关搜索

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

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