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

展开阅读全文
相关资源
猜你喜欢
  • BS DD ISO TS 12854-2009 Gaseous media fire-extinguishing systems - Physical properties and system design - Scaling factors for Class B fuels other than heptane《气态介质灭火系统 物理性能和系统设计 除.pdf BS DD ISO TS 12854-2009 Gaseous media fire-extinguishing systems - Physical properties and system design - Scaling factors for Class B fuels other than heptane《气态介质灭火系统 物理性能和系统设计 除.pdf
  • BS DD ISO TS 13075-2009 Gaseous-media fire-extinguishing systems - Engineered extinguishing systems - Flow calculation implementation method and flow verification and testing for a.pdf BS DD ISO TS 13075-2009 Gaseous-media fire-extinguishing systems - Engineered extinguishing systems - Flow calculation implementation method and flow verification and testing for a.pdf
  • BS DD ISO TS 13399-150-2009 Cutting tool data representation and exchange - Usage guidelines《切削工具数据表示和交换 使用指南》.pdf BS DD ISO TS 13399-150-2009 Cutting tool data representation and exchange - Usage guidelines《切削工具数据表示和交换 使用指南》.pdf
  • BS DD ISO TS 13473-4-2008 Characterization of pavement texture by use of surface profiles - Spectral analysis of texture profiles《通过使用表面轮廓表征路面结构 结构轮廓的光谱分析》.pdf BS DD ISO TS 13473-4-2008 Characterization of pavement texture by use of surface profiles - Spectral analysis of texture profiles《通过使用表面轮廓表征路面结构 结构轮廓的光谱分析》.pdf
  • BS DD ISO TS 13498-2011 Dentistry Torsion test of implant body connecting part joints of endosseous dental implant systems《牙科学 种植体 骨内牙移植系统的连接部分的接头扭力试验》.pdf BS DD ISO TS 13498-2011 Dentistry Torsion test of implant body connecting part joints of endosseous dental implant systems《牙科学 种植体 骨内牙移植系统的连接部分的接头扭力试验》.pdf
  • BS DD ISO TS 13762-2002 Particle size analysis - Small angle X-ray scattering method《粒径分析 小角度X射线散射法》.pdf BS DD ISO TS 13762-2002 Particle size analysis - Small angle X-ray scattering method《粒径分析 小角度X射线散射法》.pdf
  • BS DD ISO TS 13899-3-2006 Steel - Determination of Mo Nb and W contents in alloyed steel - Inductively coupled plasma atomic emission spectrometric method - Determination of W cont.pdf BS DD ISO TS 13899-3-2006 Steel - Determination of Mo Nb and W contents in alloyed steel - Inductively coupled plasma atomic emission spectrometric method - Determination of W cont.pdf
  • BS DD ISO TS 14048-2002 Environmental management - Life cycle assessment - Data documentation format《环境管理 生物圈评价 数据文件格式》.pdf BS DD ISO TS 14048-2002 Environmental management - Life cycle assessment - Data documentation format《环境管理 生物圈评价 数据文件格式》.pdf
  • BS DD ISO TS 14415-2006 Ergonomics of the thermal environment - Application of international standards to people with special requirements《热环境的人类工效学 国际标准对有特殊要求人群的应用》.pdf BS DD ISO TS 14415-2006 Ergonomics of the thermal environment - Application of international standards to people with special requirements《热环境的人类工效学 国际标准对有特殊要求人群的应用》.pdf
  • 相关搜索

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

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