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

展开阅读全文
相关资源
猜你喜欢
  • DIN EN ISO 105-Z07-1997 Textiles - Tests for colour fastness - Part Z07 Determination of application solubility and solution stability of water-soluble dyes (ISO 105-Z07 1995) Germ.pdf DIN EN ISO 105-Z07-1997 Textiles - Tests for colour fastness - Part Z07 Determination of application solubility and solution stability of water-soluble dyes (ISO 105-Z07 1995) Germ.pdf
  • DIN EN ISO 105-Z08-1997 Textiles - Tests for colour fastness - Part Z08 Determination of solubility and solution stability of reactive dyes in the presence of electrolytes (ISO 105.pdf DIN EN ISO 105-Z08-1997 Textiles - Tests for colour fastness - Part Z08 Determination of solubility and solution stability of reactive dyes in the presence of electrolytes (ISO 105.pdf
  • DIN EN ISO 105-Z09-1997 Textiles - Tests for colour fastness - Part Z09 Determination of cold water solubility of water-soluble dyes (ISO 105-Z09 1995) German version EN ISO 105-Z0.pdf DIN EN ISO 105-Z09-1997 Textiles - Tests for colour fastness - Part Z09 Determination of cold water solubility of water-soluble dyes (ISO 105-Z09 1995) German version EN ISO 105-Z0.pdf
  • DIN EN ISO 105-Z10-1999 Textiles - Tests of colour fastness - Part Z10 Determination of relative colour strength of dyes in solution (ISO 105-Z10 1997) German version EN ISO 105-Z1.pdf DIN EN ISO 105-Z10-1999 Textiles - Tests of colour fastness - Part Z10 Determination of relative colour strength of dyes in solution (ISO 105-Z10 1997) German version EN ISO 105-Z1.pdf
  • DIN EN ISO 105-Z11-2001 Textiles - Tests for colour fastness - Part Z11 Evaluation of speckiness of colorant dispersions (ISO 105-Z11 1998) German version EN ISO 105-Z11 2000《纺织品 色.pdf DIN EN ISO 105-Z11-2001 Textiles - Tests for colour fastness - Part Z11 Evaluation of speckiness of colorant dispersions (ISO 105-Z11 1998) German version EN ISO 105-Z11 2000《纺织品 色.pdf
  • DIN EN ISO 10504-2015 Starch derivatives - Determination of the composition of glucose syrups fructose syrups and hydrogenated glucose syrups - Method using high-performance liquid.pdf DIN EN ISO 10504-2015 Starch derivatives - Determination of the composition of glucose syrups fructose syrups and hydrogenated glucose syrups - Method using high-performance liquid.pdf
  • DIN EN ISO 10510-2011 Tapping screw and washer assemblies with plain washers (ISO 10510 2011) German version EN ISO 10510 2011《自攻螺钉和平垫圈组合件(ISO 10510-2011) 德文版本EN ISO 10510-2011》.pdf DIN EN ISO 10510-2011 Tapping screw and washer assemblies with plain washers (ISO 10510 2011) German version EN ISO 10510 2011《自攻螺钉和平垫圈组合件(ISO 10510-2011) 德文版本EN ISO 10510-2011》.pdf
  • DIN EN ISO 10511-2013 Prevailing torque type hexagon thin nuts (with non-metallic insert) (ISO 10511 2012) German version EN ISO 10511 2012《有效力矩型六角薄螺母(非金属嵌件)(ISO 10511-2012) 德文版本EN.pdf DIN EN ISO 10511-2013 Prevailing torque type hexagon thin nuts (with non-metallic insert) (ISO 10511 2012) German version EN ISO 10511 2012《有效力矩型六角薄螺母(非金属嵌件)(ISO 10511-2012) 德文版本EN.pdf
  • DIN EN ISO 10512-2013 Prevailing torque type hexagon regular nuts (with non-metallic insert) with metric fine pitch thread - Property classes 6 8 and 10 (ISO 10512 2012) German ver.pdf DIN EN ISO 10512-2013 Prevailing torque type hexagon regular nuts (with non-metallic insert) with metric fine pitch thread - Property classes 6 8 and 10 (ISO 10512 2012) German ver.pdf
  • 相关搜索

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

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