问题
问答题
在C盘中有一个名为temp.txt的文本文件。
#include <stdio.h>
#include <stdlib.h>
main()
int i,n;
FILE*fp;
if((fp=fopen("c:\\temp.txt","w+"))==NULL)
printf("can not set the temp file\n");exit(0);
for(i=1;i<=10;i++)fprintf(fp,"%3d",i);
for(i=0;i<5;i++)
fseek(fp,*6L,SEEK_SET);
fscanf(fp,"%d",&n);
printf("%3d",n);
fclose(fp);
答案
参考答案:1 3 5 7 9