#include
main()
{floatf;
FILE*fp;
printf("\ninputafloatnumber:");
scanf("%f,&f;)
if((____)==NULL)
{printf("Can'topenfile\n");exit(0);}
fseek(fp,4*sizeof(float),SEEK_SET)
if(____!=1)
printf("filewriteerror.\n");
fclose(fo);
}
【正确答案】:填空内容为打开文件和向文件中写入数据。 fp=fopen("f1.dat","wb") fwrite(&f,4*sizeof(float),l,fp)