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

展开阅读全文
相关资源
猜你喜欢
  • ITU-T G 698 1 SPANISH-2006 Multichannel DWDM applications with single-channel optical interfaces《带有单信道光接口的多信道高密度波分多路复用技术(DWDM)应用 15号研究组》.pdf ITU-T G 698 1 SPANISH-2006 Multichannel DWDM applications with single-channel optical interfaces《带有单信道光接口的多信道高密度波分多路复用技术(DWDM)应用 15号研究组》.pdf
  • ITU-T G 698 1 SPANISH-2009 Multichannel DWDM applications with single-channel optical interfaces.pdf ITU-T G 698 1 SPANISH-2009 Multichannel DWDM applications with single-channel optical interfaces.pdf
  • ITU-T G 698 1-2006 Multichannel DWDM applications with single-channel optical interfaces (Study Group 15)《带有单信道光接口的多信道高密度波分多路复用技术(DWDM)应用 15号研究组》.pdf ITU-T G 698 1-2006 Multichannel DWDM applications with single-channel optical interfaces (Study Group 15)《带有单信道光接口的多信道高密度波分多路复用技术(DWDM)应用 15号研究组》.pdf
  • ITU-T G 698 1-2009 Multichannel DWDM applications with single-channel optical interfaces (Study Group 15)《(预发布)含有单通道光学接口的多通道密集波分复用(DWDM)应用》.pdf ITU-T G 698 1-2009 Multichannel DWDM applications with single-channel optical interfaces (Study Group 15)《(预发布)含有单通道光学接口的多通道密集波分复用(DWDM)应用》.pdf
  • ITU-T G 698 2-2009 Amplified multichannel dense wavelength division multiplexing applications with single channel optical interfaces (Study Group 15)《含有单通道光学接口的增强型多通道密集波分复用(DWDM)应用.pdf ITU-T G 698 2-2009 Amplified multichannel dense wavelength division multiplexing applications with single channel optical interfaces (Study Group 15)《含有单通道光学接口的增强型多通道密集波分复用(DWDM)应用.pdf
  • ITU-T G 698 3-2012 Multichannel seeded DWDM applications with single-channel optical interfaces (Study Group 15)《使用单信道光接口的多通道密集波分复用(DWDM)应用程序 15号研究组》.pdf ITU-T G 698 3-2012 Multichannel seeded DWDM applications with single-channel optical interfaces (Study Group 15)《使用单信道光接口的多通道密集波分复用(DWDM)应用程序 15号研究组》.pdf
  • ITU-T G 698 4-2018 Multichannel bi-directional DWDM applications with port agnostic single-channel optical interfaces (Study Group 15).pdf ITU-T G 698 4-2018 Multichannel bi-directional DWDM applications with port agnostic single-channel optical interfaces (Study Group 15).pdf
  • ITU-T G 701 FRENCH-1993 VOCABULARY OF DIGITAL TRANSMISSION AND MULTIPLEXING AND PULSE CODE MODULATION (PCM) TERMS《关于数字传输和复用脉冲编码调制(PCM)的词汇 数字传输系统的一般性质(15号研究组)40pp》.pdf ITU-T G 701 FRENCH-1993 VOCABULARY OF DIGITAL TRANSMISSION AND MULTIPLEXING AND PULSE CODE MODULATION (PCM) TERMS《关于数字传输和复用脉冲编码调制(PCM)的词汇 数字传输系统的一般性质(15号研究组)40pp》.pdf
  • ITU-T G 701 SPANISH-1993 VOCABULARY OF DIGITAL TRANSMISSION AND MULTIPLEXING AND PULSE CODE MODULATION (PCM) TERMS《关于数字传输和复用脉冲编码调制(脉冲编码调制(PCM))的词汇 数字传输系统的一般性质(15号研究组)40pp》.pdf ITU-T G 701 SPANISH-1993 VOCABULARY OF DIGITAL TRANSMISSION AND MULTIPLEXING AND PULSE CODE MODULATION (PCM) TERMS《关于数字传输和复用脉冲编码调制(脉冲编码调制(PCM))的词汇 数字传输系统的一般性质(15号研究组)40pp》.pdf
  • 相关搜索
    资源标签

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

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