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

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

1、国家二级 C 语言机试(操作题)模拟试卷 345(无答案)一、程序填空题1 函数 fun 的功能是:把形参 a 所指数组中的最大值放在 a0中,接着求出 a 所指数组中的最小值放在 a1中;再把 a 所指数组元素中的次大值放在 a2中,把 a 数组元素中的次小值放在 a3中;其余以此类推。例如:若 a 所指数组中的数据最初排列为:1、4、2、3、9、6、5、8、7,则按规则移动后,数据排列为:9、l、8、2、7、3、6、4、5。形参 n 中存放 a 所指数组中数据的个数。请在程序的下划线处填入正确的内容并把下划线删除,使程序得出正确的结果。注意:源程序存放在考生文件夹下的 BLANK1C 中。

2、不得增行或删行,也不得更改程序的结构!#include #define N 9void fun (int _1_ f int n) int i,j,max,min ,px ,pnc t;for (i=0; i aj) min aj; pn = j;if (px != i) t=a i ; a i =max; a px=t ;if (pn= i) pn=px;if (pn != i+1) t=a i+1 ; a i+1 min; a pn=t; main () int bN=1,4,2c 3,9,6,5,8,7, 1;printf ( “nThe original data:n“) ;for (

3、i=0; i#define SIZE 20fun (double *s, double *w) int k,i; double sum ;for ( k=2,i=0 ;i#define N 8typedef struct char num 10 ;double s; STREC;double fun (STREC *a,STREC *b,int *n)main ()STREC s Nl= “GA05“,85, “GA03“,76, “GA02“,69, “GA04“,85 , “GA01“,91 ,STREC hN,t;FILE *out ;int i,j,n; double ave;ave=fun (s,h,&n) ;printf(“The d student data whichis lower than 73f:n“ ,n,ave) ;printf ( “ s 4 1fn“,h i numprintf (“n“) ;out = fopen (“outdat“,“w“) ;fprintf ( out, “ oo d n 00 7 3fn“ ,n,ave ) ;for (i=0; ih jl s)fprintf (out,“ 0041fn“,h i s) ;fclose (out) ;

展开阅读全文
相关资源
猜你喜欢
  • ASTM D642-2000(2010) Standard Test Method for Determining Compressive Resistance of Shipping Containers Components and Unit Loads《测定船用集装箱 组合件和单体加载的抗压缩能力的标准试验方法》.pdf ASTM D642-2000(2010) Standard Test Method for Determining Compressive Resistance of Shipping Containers Components and Unit Loads《测定船用集装箱 组合件和单体加载的抗压缩能力的标准试验方法》.pdf
  • ASTM D642-2015 Standard Test Method for Determining Compressive Resistance of Shipping Containers Components and Unit Loads《测定船用集装箱 组合件和单体加载的抗压缩能力的标准试验方法》.pdf ASTM D642-2015 Standard Test Method for Determining Compressive Resistance of Shipping Containers Components and Unit Loads《测定船用集装箱 组合件和单体加载的抗压缩能力的标准试验方法》.pdf
  • ASTM D643-1997(2002) Standard Test Method for Folding Endurance of Paper by the Schopper Tester《用朔柏测试仪测试纸的折痕持久性的标准试验方法》.pdf ASTM D643-1997(2002) Standard Test Method for Folding Endurance of Paper by the Schopper Tester《用朔柏测试仪测试纸的折痕持久性的标准试验方法》.pdf
  • ASTM D644-1999(2002) Standard Test Method for Moisture Content of Paper and Paperboard by Oven Drying《用炉烘干法测定纸和纸板中水分的标准试验方法》.pdf ASTM D644-1999(2002) Standard Test Method for Moisture Content of Paper and Paperboard by Oven Drying《用炉烘干法测定纸和纸板中水分的标准试验方法》.pdf
  • ASTM D645 D645M-1997(2002) Standard Test Method for Thickness of Paper and Paperboard.pdf ASTM D645 D645M-1997(2002) Standard Test Method for Thickness of Paper and Paperboard.pdf
  • ASTM D646-2013 Standard Test Method for Mass Per Unit Area of Paper and Paperboard of Aramid Papers (Basis Weight)《纸张及纸板基本重量的标准试验方法(单位面积重量)》.pdf ASTM D646-2013 Standard Test Method for Mass Per Unit Area of Paper and Paperboard of Aramid Papers (Basis Weight)《纸张及纸板基本重量的标准试验方法(单位面积重量)》.pdf
  • ASTM D648-2016 Standard Test Method for Deflection Temperature of Plastics Under Flexural Load in the Edgewise Position《侧面位置弯曲荷载下塑料偏转温度的标准试验方法》.pdf ASTM D648-2016 Standard Test Method for Deflection Temperature of Plastics Under Flexural Load in the Edgewise Position《侧面位置弯曲荷载下塑料偏转温度的标准试验方法》.pdf
  • ASTM D648-2018 Standard Test Method for Deflection Temperature of Plastics Under Flexural Load in the Edgewise Position《边缘位置弯曲载荷下塑料挠曲温度的标准试验方法》.pdf ASTM D648-2018 Standard Test Method for Deflection Temperature of Plastics Under Flexural Load in the Edgewise Position《边缘位置弯曲载荷下塑料挠曲温度的标准试验方法》.pdf
  • ASTM D653-2007d Standard Terminology Relating to Soil Rock and Contained Fluids《与土壤、岩石和包含的液体相关的标准术语》.pdf ASTM D653-2007d Standard Terminology Relating to Soil Rock and Contained Fluids《与土壤、岩石和包含的液体相关的标准术语》.pdf
  • 相关搜索

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

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