打开文件,将读写位置指向文件头部的操作是
A: fseek(fp,0L,SEEK_END);
B: fseek(fp,0L,SEEK_CUR);
C: fseek(fp,0L,SEEK_SET);
D: fseek(fp,0L,SEEK_BEGIN);
A: fseek(fp,0L,SEEK_END);
B: fseek(fp,0L,SEEK_CUR);
C: fseek(fp,0L,SEEK_SET);
D: fseek(fp,0L,SEEK_BEGIN);
举一反三
- 下列使读/写指针不指向文件首的操作是() A: rewind(fp) B: fseek(fp,0L,2) C: fopen("f1.c","r") D: fseek(fp,0L,0)
- 定义FILE*fp,则下列能正确表达将fp置于文件末尾的是:() A: feof(fp) B: rewind(fp) C: fseek(fp,0L,0) D: fseek(fp,0L,2)
- 下列语句中,不能将fp指向的文件的内部指针指向文件尾的是 A: fseek(fp,20L,1); B: fseek(fp,0L,SEEK END); C: fp=fopen("a.txt","ab"); D: fp=fopen("a.txt","ab+");
- 【单选题】如果将文件型指针fp指向的文件内部指针置于文件尾,正确的语句是 A. feof(fp); B. rewind(fp); C. fseek(fp,0L,0); D. fseek(fp,0L,2);
- 【单选题】以下不能将文件指针移到文件开头的函数是( ). A: rewind(fp); B: fseek(fp,0,SEEK_SET); C: fseek(fp,-(long)ftell(fp),SEEK_CUR); D: fseek(fp,0,SEEK_END);