以读写方式打开一个已有的文本文件filel,下面有关fopen函数正确的调用方式是()。
A: FILE
*fp
fP=fopen("filel","r")
B: FILE
*fp
C: FILE *fp
fp=foden("filel","r+")
D: D.FILE = *fp; fp = fopen(“file1”,”rb+”);
A: FILE
*fp
fP=fopen("filel","r")
B: FILE
*fp
C: FILE *fp
fp=foden("filel","r+")
D: D.FILE = *fp; fp = fopen(“file1”,”rb+”);
举一反三
- 以二进制只读方式打开一个已有的文本文件file1,正确调用fopen函数的方式是() A: FILE*fp;fp=fopen("file1","rb"); B: FILE*fp;fp=fopen("file1","r+"); C: FILE*fp;fp=fopen("file1","r"); D: FILE*fp;fp=fopen("file1","rb+");
- 以只读方式打开一个已有的文本文件file1.txt,下面有关fopen函数正确的调用方式为________。 A: FILE *fp;fp=fopen("file1.txt","w"); B: FILE *fp;fp=fopen("file1.txt","r"); C: FILE *fp;fp=fopen("file1.txt","r+"); D: FILE *fp;fp=fopen("file1.txt","rb+");
- 定义fp为文件型指针变量,以读写方式打开一个已存在的文本文件test.dat,下面fopen函数正确的调用方式是: A: FILE *fp; fp=fopen("test.dat", "rb"); B: FILE*fp; fp=fopen("test.dat", "r+"); C: FILE *fp; fp=fopen("test.dat", "r"); D: FILE *fp; fp=fopen("test.dat", "rb+");
- 以读写方式打开一个已有的文本文件file1,并且FILE *fp,下面fopen函数正确的调用方式是( )。 A: fp=fopen(“file1”,“r”) B: fp=fopen(“file1”,“rb”) C: fp=fopen(“file1”,“r+”) D: fp=fopen(“file1”,“w”)
- 以只读方式打开一个已存在的文本文件ab.txt,以下选项中正确的是______。A. FILE *fp;fp=fopen("ab.txt","a");B. FILE *fp;fp=fopen("ab.txt","w");C. FILE *fp;fp=fopen("ab.txt","r");D. FILE *fp;fp=fopen("ab.txt","rb+"); A: FILE *fp;fp=fopen("ab.txt","a"); B: FILE *fp;fp=fopen("ab.txt","w"); C: FILE *fp;fp=fopen("ab.txt","r"); D: FILE *fp;fp=fopen("ab.txt","rb+");