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

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

1、国家二级 C 语言机试(操作题)模拟试卷 349(无答案)一、程序填空题1 程序通过定义学生结构体变量,存储了学生的学号、姓名和 3 门课的成绩。函数fun 的功能是对形参 b 所指结构体变量中的数据进行修改,最后在主函数中输出修改后的数据。例如:b 所指变量 t 中的学号、姓名、和三门课的成绩依次是:10002、“ZhangQi“、93、85、87,修改后输出 t 中的数据应为:10004、“Lijie“、93、85、87。请在程序的下划线处填入正确的内容并把下划线删除,使程序得出正确的结果。注意:源程序存放在考生文件夹下的 BLANK1C 中。不得增行或删行,也不得更改程序的结构!#inc

2、lude #include struct student long sno;char name 10 ;float score 3;void fun (struct student *b)/*found*/b _1_ =10004;/*found*/strcpy (b_2_, “Lijie“) ;main () struct student t=10002,“ZhangQi“,93,85,87 ;int i;printf (“nnThe original data:nf) ;printf(“nNo: ld Name: snScores:“, t sno, tname) ;for (i=0; i

3、000001) y=fun (a, x1) ; else y=x1; return y; main () double x; printf(“Enter x: “) ; scanf printf(“The square root of 1fis lfn“ ,x,fun (x,10); 三、程序设计题3 学生的记录由学号和成绩组成,N 名学生的数据已在主函数中放入结构体数组 s中,请编写函数劬,它的功能是:把高于等于平均分的学生数据放在 b 所指的数组中,高于等于平均分的学生人数通过形参 n 传回,平均分通过函数值返回。注意:部分源程序在文件 PROG1C 文件中。请勿改动主函数 main 和其

4、他函数中的任何内容,仅在函数 fun 的花括号中填入你编写的若干语句。#include #define N 12typedef struct char num 10 ;double s; STREC;double fun(STREC *a,STREC *b,int*n)main ( )STREC s ENJ = “GA05“,85, “GA03“ ,76, “GA02“,69, “GA04“,85 , “GA01“,91 , “GA07“,72,“GA08“,64 ,“GA06“ ,87 , “GA09“,60, “GA11“,79 , “GA12 “ ,73, “GA10“,90 ;STREC hN,t;FILE *out ;int i,j,n; double ave;ave=fun (s,h,&n) ;printf ( “The d student data whichis higher than o073f:n“,n,ave);printf (“ s 4 1fn“ ,h i num,printf ( “n“) ;out =fopen (“outdat“,“w“) ;fprintf ( out, “ dno0 7 3fnl ,n,ave) ;for (i=0; in 1; i+)fprintf (out,“ 4 lfn“,h i s) ;fclose (out) ;

展开阅读全文
相关资源
猜你喜欢
  • DS IEC 767-1986 Helical-scan video tape cassette system using 12 65 mm (0 5 in) magnetic tape on type beta format《B型12 65mm(0 5in)磁带螺旋扫描盒式磁带录像系统》.pdf DS IEC 767-1986 Helical-scan video tape cassette system using 12 65 mm (0 5 in) magnetic tape on type beta format《B型12 65mm(0 5in)磁带螺旋扫描盒式磁带录像系统》.pdf
  • DS IEC 794-1 Till 1-1991 Optical fibre cables Part 1 Generic specification《光缆 第1部分 通用规范》.pdf DS IEC 794-1 Till 1-1991 Optical fibre cables Part 1 Generic specification《光缆 第1部分 通用规范》.pdf
  • DS IEC 794-1-1992 Optical fibre cables Part 1 Generic specification《光缆 第1部分 通用规范》.pdf DS IEC 794-1-1992 Optical fibre cables Part 1 Generic specification《光缆 第1部分 通用规范》.pdf
  • DS IEC 795-1987 Test method for evaluating thermal endurance of flexible sheet materials using the wrapped tube method《用缠绕管法评定柔软片材耐热性的试验方法》.pdf DS IEC 795-1987 Test method for evaluating thermal endurance of flexible sheet materials using the wrapped tube method《用缠绕管法评定柔软片材耐热性的试验方法》.pdf
  • DS IEC 839-2-7-1995 Alarm systems - Part 2 Requirements for intruder alarm systems - Section 7 Passive glass-break detectors for use in buildings《警报系统 第2部分:闯入警报系统的要求 第7节:建筑物内用无源玻璃破.pdf DS IEC 839-2-7-1995 Alarm systems - Part 2 Requirements for intruder alarm systems - Section 7 Passive glass-break detectors for use in buildings《警报系统 第2部分:闯入警报系统的要求 第7节:建筑物内用无源玻璃破.pdf
  • DS IEC 885-1-1987 Electrical test methods for electric cables Part 1 Electrical tests for cables cords and wires for voltages up to and including 450 750 V《电缆的电气试验方法 第1部分 电压在450 75.pdf DS IEC 885-1-1987 Electrical test methods for electric cables Part 1 Electrical tests for cables cords and wires for voltages up to and including 450 750 V《电缆的电气试验方法 第1部分 电压在450 75.pdf
  • DS IEC 949-1990 Calculation of thermally permissible short-circuit currents taking into account non-adiabatic heating effects《在考虑非绝缘加热效应条件下的热容许短路电流的计算》.pdf DS IEC 949-1990 Calculation of thermally permissible short-circuit currents taking into account non-adiabatic heating effects《在考虑非绝缘加热效应条件下的热容许短路电流的计算》.pdf
  • DS IEC TR 1200-53-1995 Electrical installation guide - Part 53 Selection and erection of electrical equipment - Switchgear and controlgear《电气设备安装指南 第53部分:电气设备的选择和安装 开关设备和控制设备》.pdf DS IEC TR 1200-53-1995 Electrical installation guide - Part 53 Selection and erection of electrical equipment - Switchgear and controlgear《电气设备安装指南 第53部分:电气设备的选择和安装 开关设备和控制设备》.pdf
  • DS INF 100-1994 Information and documentation-Indexing guidelines-Methods for analysing documents determining their subjects and selecting indexing terms《信息与文件 索引指南 分析文件,确定其主题并选择索引.pdf DS INF 100-1994 Information and documentation-Indexing guidelines-Methods for analysing documents determining their subjects and selecting indexing terms《信息与文件 索引指南 分析文件,确定其主题并选择索引.pdf
  • 相关搜索

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

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