二级C语言题库答案
第1套题
一、程序填空题
#include lt;stdio.hgt;
#include lt;stdlib.hgt;
#define N 5
typedef struct
{ int num;
char name[10];
char tel[10];
}STYPE;
void check();
/**********found**********/ int fun(STYPE*std)
{
/**********found**********/ FILE *fp; int i;
if((fp=fopen(quot;myfile5.datquot;,quot;wbquot;))==NULL) return(0);
printf(quot;\nOutput data to file !\nquot;); for(i=0; ilt;N; i++)
/**********found**********/
fwrite(amp;std[i], sizeof(STYPE), 1, fp); fclose(fp);
return (1);
二、程序改错题
#include lt;stdio.hgt;
#include lt;string.hgt;
void fun (char *
原创力文档

文档评论(0)