A.fin. fail( ) ;
B.fin. bad( ) ;
C.fin. good( ) ;
D.fin. eof( ) ;
[单选题]对于下面的程序 ifstream fin(c:/test.txt); if(fin) cout<<"ok"; else cout<<"wrong"; 对于if语句中的内容可以换为A.fin.fail( ):B.fin.bad( );C.fin.good( );D.fin.eof( );
[单选题]下面的程序执行后,文件test.txt中的内容是() include void fun(char*
[单选题]若磁盘上已存全路径文件名为c:/ctest/test.txt的文件,下面语句中不能打开该文件的是( )。A.ifstream *pFile=new ifstream("c://ctest//test.txt");B.ifstream file("c://ctest//test.txt");C.ifstream file;file.open("c://ctest//test.txt");D.ifstream file("c:/etest/test.txt");
[单选题]执行以下程序后, test.txt 文件的内容是 ( 若文件能正常打开 )#include <stdio.h>main(){ FILE *fp;char *s1="Fortran",*s2="Basic";if((fp=fopen("test.txt","wb ” ))==NULL){ printf("Can't open test.txt file/n");exit(1);}fwrite(s1,7,1,fp); /* 把从地址 s1 开始的 7 个字符写到 fp
[单选题]执行以下程序后,test.txt文件的内容是(若文件能正常打开)______。 #include <stdio.h> main() { FILE *fp; char *s1="Fortran",*s2="Basic"; if((fp=fopen("test.txt","wb"))=NULL) { printf("Can't open test.txt file/n"); exit(1);} fwrite(s1,7,1,fp); /* 把从地址s1开始的7个字符写到fp所指文
[单选题]要向已有数据的c:/test/test.txt文件添加数据,正确的文件打开命令是()。A . Open〞c:/test/test.txt〞ForAppendAs#512B . Open〞c:/test/test.txt〞ForAppendAs#511C . Open〞c:/test/test.txt〞ForOutputAs#511D . Open〞c:/test/test.txt〞ForOutputAs#512
[单选题]若目前D盘根目录下并不存在test.txt文件,则下列打开文件方式不会自动创建test.txt文件的是( )。A.ifstreamfin;fin.o
[单选题]执行以下程序后,test.txt文件的内容是(若文件能正常打开)( )。includemain(){FILE*fp;c执行以下程序后,test.txt文件的内容是(若文件能正常打开)( )。 #include<stdio.h> main() { FILE*fp; char*s1="Fortran",*s2="Basic"; if((fp=fopen("test.txt","wb"))==NULL) { printf("Can't open test.txt file/n")
[试题]设文件test.txt中原已写入字符串Begin,执行以下程序后,文件中的内容为( 15 ) 。#include <stdio.h>main( ){ FILE *fp;fp= fopen( "test.txt”, ”w+”);fputs( "test",fp);fclose(fp);}
[单选题]下列语句不能够用于打开C根目录下文件test.txt的语句是A.ifstream fin;fin.open("C://test.txt");B.ifstream fin("C://test.txt");C.A)和B)D.ifstream fin;fin("C://test.txt");