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

展开阅读全文
相关资源
猜你喜欢
  • ETSI SR 001 677-1999 Seamless Service Offering Giving Users Consistent Access to Application Service Portfolios Independent of Access Network and Core Network Companion Document《提供_1.pdf ETSI SR 001 677-1999 Seamless Service Offering Giving Users Consistent Access to Application Service Portfolios Independent of Access Network and Core Network Companion Document《提供_1.pdf
  • ETSI SR 001 687-1999 Global Multimedia Mobility (GMM) Seamless Service Offering (V1 1 1)《全球多媒体移动性(GMM) 提供无缝业务(版本1 1 1)》.pdf ETSI SR 001 687-1999 Global Multimedia Mobility (GMM) Seamless Service Offering (V1 1 1)《全球多媒体移动性(GMM) 提供无缝业务(版本1 1 1)》.pdf
  • ETSI SR 001 996-2013 Human Factors (HF) An annotated bibliography of documents dealing with Human Factors and disability (V6 1 1)《人为因素(HF) 处理人为因素和残疾的带注释的文件书目 版本6 1 1》.pdf ETSI SR 001 996-2013 Human Factors (HF) An annotated bibliography of documents dealing with Human Factors and disability (V6 1 1)《人为因素(HF) 处理人为因素和残疾的带注释的文件书目 版本6 1 1》.pdf
  • ETSI SR 002 087-1999 Guidelines for the National Handling of ETSI Deliverables in Central and Eastern European Countries (CEEC)《可传送ETSI在中欧和东欧国家中的转换指南(CEEC)(版本1 2 1)》.pdf ETSI SR 002 087-1999 Guidelines for the National Handling of ETSI Deliverables in Central and Eastern European Countries (CEEC)《可传送ETSI在中欧和东欧国家中的转换指南(CEEC)(版本1 2 1)》.pdf
  • ETSI SR 002 176-2003 Electronic Signatures and Infrastructures (ESI) Algorithms and Parameters for Secure Electronic Signatures《电子签名和基础结构(ESI) 安全电子签名的算法和参数(版本1 1 1)》.pdf ETSI SR 002 176-2003 Electronic Signatures and Infrastructures (ESI) Algorithms and Parameters for Secure Electronic Signatures《电子签名和基础结构(ESI) 安全电子签名的算法和参数(版本1 1 1)》.pdf
  • ETSI SR 002 180-2003 Requirements for communication of citizens with authorities organizations in case of distress (emergency call handling) (V1 1 1)《危难发生时公民与政府当局 组织的通信要求(应急呼叫控制)(版.pdf ETSI SR 002 180-2003 Requirements for communication of citizens with authorities organizations in case of distress (emergency call handling) (V1 1 1)《危难发生时公民与政府当局 组织的通信要求(应急呼叫控制)(版.pdf
  • ETSI SR 002 180-2003 Requirements for communication of citizens with authorities organizations in case of distress (emergency call handling) (V1 1 1)《危难发生时公民与政府当局 组织的通信要求(应急呼叫控制)(版_1.pdf ETSI SR 002 180-2003 Requirements for communication of citizens with authorities organizations in case of distress (emergency call handling) (V1 1 1)《危难发生时公民与政府当局 组织的通信要求(应急呼叫控制)(版_1.pdf
  • ETSI SR 002 211-2006 Electronic communications networks and services Candidate list of standards and or specifications in accordance with Article 17 of Directive 2002 21 EC (V2 1 2.pdf ETSI SR 002 211-2006 Electronic communications networks and services Candidate list of standards and or specifications in accordance with Article 17 of Directive 2002 21 EC (V2 1 2.pdf
  • ETSI SR 002 211-2006 Electronic communications networks and services Candidate list of standards and or specifications in accordance with Article 17 of Directive 2002 21 EC (V2 1 2_1.pdf ETSI SR 002 211-2006 Electronic communications networks and services Candidate list of standards and or specifications in accordance with Article 17 of Directive 2002 21 EC (V2 1 2_1.pdf
  • 相关搜索

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

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