A.打开一个文件,不管文件在不在
B.打开文件并写入
C.在桌面上打开一个文件(路径得看个人具体情况),w的意思是,如果有则在文件里写入helloworld,如果没有则创建一个文件。
D.打开文件,没有报错
第1题:
要建立文件流并打开当前目录下的文件file.dat用于输入,下列语句中错误的是
A.ifstream fin=ifstream.open(”file.dat”);
B.ifstream*fin=new ifstream(”file.dat”);
C.ifstream fin;fin.open(”file.dat”);
D.ifstream*fin=new ifstream();fin->open(”file.dat”);
第2题:
下列可以打开随机文件的语句是( )。
A.Open"file 1.dat"For Input As#1
B.Open"file1.dat"For Append As#1
C.Open"file1.dat"For Output As#1
D.Open"file1.dat"For Randow As#1 Len=20
第3题:
下面程序代码打开了一个二进制文件。 …… ifstream file3; …… file3.open("abc.bmp", );
第4题:
要建立文件流并打开当前目录下的文件6le.dat用于输入,下列语句中错误的是( )。
A.ifstream fin=ffstream.open(”file.dat”);
B.ifstream*fin=new ifstream(”file.dat”);
C.ifstream fin;fin.open(”file.dat”);
D.ifstream*fin=new ifstream;fin->open(”file.dat”);
第5题:
在C中,打开文件的程序段中正确的是
A.#include <stdio.h> FILE *fp; fp=fopen("file1.c","WB");
B.#include <stdio.h> FILE fp; fp=fopen("file1.c","w");
C.#include <stdio.h> FILE *fp; fp=fopen("file1.c","w");
D.#include <string.h> FILE *fp; fp=fopen("file1.c","w");