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

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

1、国家二级 C 语言机试(操作题)模拟试卷 352(无答案)一、程序填空题1 函数 fun 的功能是:将形参 a 所指数组中的前半部分元素中的值和后半部分元素中的值对换。形参 n 中存放数组中数据的个数,若 n 为奇数,则中间的元素不动。例如:若 a 所指数组中的数据依次为: 1、2、3、4、5、6、7、8、9,则调换后为:6、7、8、9、5、l、2、3、4。请在程序的下划线处填入正确的内容并把下划线删除,使程序得出正确的结果。注意:源程序存放在考生文件夹下的 BLANK1C 中。不得增行或删行,也不得更改程序的结构!#include #define N 9void fun (int al, i

2、nt n) int i,t,p;/*found*/p = (n2=0) ?n/2:n/2+ _1_;for (i=0; ivoid fun ( float *a,float *b f float *c)float *k;main () float a, b,c ;printf(“Input a b c: “); scanf(“ff f“,&a, &b,&c) ;printf(“a = 4lf ,b = 41f,cprintf(“a =4lf ,b = 41f,c三、程序设计题3 学生的记录由学号和成绩组成,N 名学生的数据已在主函数中放入结构体数组 s中,请编写函数 fun,它的功能是:把分数

3、最高的学生数据放在 h 所指的数组中,注意:分数最高的学生可能不止一个,函数返回分数最高的学生的人数。注意:部分源程序在文件 PROG1C 中。请勿改动主函数 main 和其他函数中的任何内容,仅在函数 fun 的花括号中填入你编写的若干语句。#include #define N 16typedef struct char num 10 ;int s; STREC;int fun (STREC *a, STREC *b)main ()STREC s N= “GA05“,85, “GA03“,76, “GA02“,69, “GA04“,85 , “GA01“,91 , “GA0 7“ ,72 ,

4、 “GA08“,64 ,“GA06“,87 , “GA015“,85, “GA013“,91 , “GA012“,64 , “GA014“,91, “GA011“,77 , “GA017“,64 ,“GA018“,64, t“GA016“,72 ;STREC hN;int i,n; FILE *out ;n=fun (s,h) ;printf(“The d highest score:printf ( “ s 4dn“,h i num,h is) ;printf (“n“) ;out = fopen (“outdat“,“w“) ;fprintf (out, “dn“ ,n) ;fprintf (out, “4dn“,h i s)fclose (out) ;

展开阅读全文
相关资源
猜你喜欢
  • DIN EN 13396-2004 Products and systems for the protection and repair of concrete structures - Test methods - Measurement of chloride ion ingress German version EN 13396 2004《混凝土结构的.pdf DIN EN 13396-2004 Products and systems for the protection and repair of concrete structures - Test methods - Measurement of chloride ion ingress German version EN 13396 2004《混凝土结构的.pdf
  • DIN EN 13397-2002 Industrial valves - Diaphragm valves made of metallic materials German version EN 13397 2001《工业用阀门 金属材料制隔膜阀门 德文版本 EN 13397 2001》.pdf DIN EN 13397-2002 Industrial valves - Diaphragm valves made of metallic materials German version EN 13397 2001《工业用阀门 金属材料制隔膜阀门 德文版本 EN 13397 2001》.pdf
  • DIN EN 134-1998 Respiratory protective devices - Nomenclature of components German version EN 134 1998《呼吸防护设备 部件名称》.pdf DIN EN 134-1998 Respiratory protective devices - Nomenclature of components German version EN 134 1998《呼吸防护设备 部件名称》.pdf
  • DIN EN 1340 Berichtigung 1-2006 Concrete kerb units Requirements and test methods German version EN 1340 2003 Corrigenda to DIN EN 1340 2003-08 German version EN 1340 2003 AC 2006《.pdf DIN EN 1340 Berichtigung 1-2006 Concrete kerb units Requirements and test methods German version EN 1340 2003 Corrigenda to DIN EN 1340 2003-08 German version EN 1340 2003 AC 2006《.pdf
  • DIN EN 1340 Corrigendum 1-2006 Concrete kerb units - Requirements and test methods Corrigendum 1 to English version of DIN EN 1340 2003-08《混凝土路缘石组合 试验方法和要求 英文版本DIN EN 1340 2003-08勘.pdf DIN EN 1340 Corrigendum 1-2006 Concrete kerb units - Requirements and test methods Corrigendum 1 to English version of DIN EN 1340 2003-08《混凝土路缘石组合 试验方法和要求 英文版本DIN EN 1340 2003-08勘.pdf
  • DIN EN 1340-2003 Concrete kerb units Requirements and test methods German version EN 1340 2003《混凝土路边挡块 要求和试验方法》.pdf DIN EN 1340-2003 Concrete kerb units Requirements and test methods German version EN 1340 2003《混凝土路边挡块 要求和试验方法》.pdf
  • DIN EN 13400 Berichtigung 1-2006 Footwear - Sampling location preparation and duration of conditioning of samples and test pieces German version EN 13400 2001 Corrigenda to DIN EN .pdf DIN EN 13400 Berichtigung 1-2006 Footwear - Sampling location preparation and duration of conditioning of samples and test pieces German version EN 13400 2001 Corrigenda to DIN EN .pdf
  • DIN EN 13400-2002 Footwear - Sampling location preparation und duration of conditioning of samples and test pieces German version EN 13400 2001《鞋类 样品和试样的取样部位、制备和老化耐久性 德文版本 EN 13400.pdf DIN EN 13400-2002 Footwear - Sampling location preparation und duration of conditioning of samples and test pieces German version EN 13400 2001《鞋类 样品和试样的取样部位、制备和老化耐久性 德文版本 EN 13400.pdf
  • DIN EN 13402-1-2001 Size designation of clothes - Part 1 Terms definitions and body measurement procedure (ISO 3635 1981 modified) German version EN 13402-1 2001《服装尺寸命名 第1部分 术语、定义和.pdf DIN EN 13402-1-2001 Size designation of clothes - Part 1 Terms definitions and body measurement procedure (ISO 3635 1981 modified) German version EN 13402-1 2001《服装尺寸命名 第1部分 术语、定义和.pdf
  • 相关搜索
    资源标签

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

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