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

展开阅读全文
相关资源
猜你喜欢
  • EN ISO 9405-2017 en Textile floor coverings - Assessment of changes in appearance.pdf EN ISO 9405-2017 en Textile floor coverings - Assessment of changes in appearance.pdf
  • EN ISO 9408-1999 en Water Quality - Evaluation of Ultimate Aerobic Biodegradability of Organic Compounds in Aqueous Medium by Determination of Oxygen Demand in a Closed Respiromete.pdf EN ISO 9408-1999 en Water Quality - Evaluation of Ultimate Aerobic Biodegradability of Organic Compounds in Aqueous Medium by Determination of Oxygen Demand in a Closed Respiromete.pdf
  • EN ISO 9409-1-2004 en Manipulating Industrial robots - Mechanical Interfaces - Part 1 Plates《操作型工业机器人 机械接口 第1部分 板 ISO 9409-1-2004》.pdf EN ISO 9409-1-2004 en Manipulating Industrial robots - Mechanical Interfaces - Part 1 Plates《操作型工业机器人 机械接口 第1部分 板 ISO 9409-1-2004》.pdf
  • EN ISO 9409-2-2003 en Manipulating industrial robots - Mechanical interfaces - Part 2 Shafts《操作型工业机器人 机械接口 第2部分 轴 ISO 9409-2-2002》.pdf EN ISO 9409-2-2003 en Manipulating industrial robots - Mechanical interfaces - Part 2 Shafts《操作型工业机器人 机械接口 第2部分 轴 ISO 9409-2-2002》.pdf
  • EN ISO 9431-1999 en Construction Drawings - Spaces for Drawing and for Text and Title Blocks on Drawing Sheets《建筑工程制图 图样说明纸和标题栏的位置 ISO 9431-1990》.pdf EN ISO 9431-1999 en Construction Drawings - Spaces for Drawing and for Text and Title Blocks on Drawing Sheets《建筑工程制图 图样说明纸和标题栏的位置 ISO 9431-1990》.pdf
  • EN ISO 9439-2000 en Water Quality - Evaluation of Ultimate Aerobic Biodegradability of Organic Compounds in Aqueous Medium - Carbon Dioxide Evolution Test《水质 水介质中有机化合物最终有氧生物降解能力的评价.pdf EN ISO 9439-2000 en Water Quality - Evaluation of Ultimate Aerobic Biodegradability of Organic Compounds in Aqueous Medium - Carbon Dioxide Evolution Test《水质 水介质中有机化合物最终有氧生物降解能力的评价.pdf
  • EN ISO 9444-2-2010 en Continuously hot-rolled stainless steel - Tolerances on dimensions and form - Part 2 Wide strip and sheet plate《连续热轧不锈钢 尺寸和形状公差 第2部分 宽带材和薄板 板材》.pdf EN ISO 9444-2-2010 en Continuously hot-rolled stainless steel - Tolerances on dimensions and form - Part 2 Wide strip and sheet plate《连续热轧不锈钢 尺寸和形状公差 第2部分 宽带材和薄板 板材》.pdf
  • EN ISO 9445-1-2010 en Continuously cold-rolled stainless steel - Tolerances on dimensions and form - Part 1 Narrow strip and cut lengths《连续冷轧不锈钢 尺寸和形状公差 第1部分 窄带和切削长度[代替 CEN EN ISO .pdf EN ISO 9445-1-2010 en Continuously cold-rolled stainless steel - Tolerances on dimensions and form - Part 1 Narrow strip and cut lengths《连续冷轧不锈钢 尺寸和形状公差 第1部分 窄带和切削长度[代替 CEN EN ISO .pdf
  • EN ISO 9445-2-2010 en Continuously cold-rolled stainless steel - Tolerances on dimensions and form - Part 2 Wide strip and plate sheet《连续冷轧不锈钢 尺寸和形状的公差 第2部分 宽带材和厚板材 薄板材[代替 CEN EN I.pdf EN ISO 9445-2-2010 en Continuously cold-rolled stainless steel - Tolerances on dimensions and form - Part 2 Wide strip and plate sheet《连续冷轧不锈钢 尺寸和形状的公差 第2部分 宽带材和厚板材 薄板材[代替 CEN EN I.pdf
  • 相关搜索
    资源标签

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

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