A.打开一个文件,不管文件在不在
B.打开文件并写入
C.在桌面上打开一个文件(路径得看个人具体情况),w的意思是,如果有则在文件里写入helloworld,如果没有则创建一个文件。
D.打开文件,没有报错
要打开一个已存在的非空文件“file”用于修改,选择正确的语句()A、fp=fopen(“file“,“r“);B、fp=fopen(“file“,“w“);C、fp=fopen(“file“,“r+“);D、fp=fopen(“file“,“w+“);
点击查看答案
( 16 )要建立文件流并打开当前目录下的文件 file.dat 用于输入,下列语句中错误的是A ) ifstream fin=ifstream.open ( "file.dat" ) ;B ) ifstream*fir.=new ifstream ( "file.dat" ) ;C ) ifstream fin; fin.open ( "file.dat" ) ;D ) ifstream *fin=new ifstream ( ) ; fin 一 >open ( "file.dat" ) ;
下面哪种方法读文件“input.txt”是正确的()。A、in_file = open('input.txt','w')B、in_file = open('input.txt',r)C、in_file = open('input.txt','r')D、都不正确
要对顺序文件进行写操作,下列打开文件语句中正确的是______。A.Open"file1.txt" for Output As #1B.Open "file1.txt" for Input As #1C.Open "file1. txt" for Random As #1D.Open "file1. tx",for Binary As #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”);
要建立文件流并打开当前目录下的文件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”);
下列可以打开随机文件的语句是( )。A.Open"file 1.dat"For Input As#1B.Open"file1.dat"For Append As#1C.Open"file1.dat"For Output As#1D.Open"file1.dat"For Randow As#1 Len=20