若磁盘上已存在某个文本文件,其全路径文件名为 d:\ncre\test.txt ,下列语句中不 能打开该文件的是
A . ifstream file("d:\ncre\test.txt") ;
B . ifstream file("d:\ncre\test.txt");
C . ifstream file; file.open("d:\ncre\test.txt");
D . ifstream* pFile=new ifstream("d:\ncre\test.txt");
第1题:
若磁盘上已存在某个文本文件,其全路径文件名为d:\ncre\test.txt,下列语句中不能打开该文件的是
A.ifstream file("d:\ncre\test.txt");
B.ifstream file("d:\\ncre\\test.txt");
C.ifstream file;file.open("d:\\ncre\\test.txt");
D.ifstream* pFile=new ifstream("d:\\ncre\\test.txt");
第2题:
某网站主页地址为http://ncre.eduexam.cn/weboot/,打开网页,浏览“网络课堂”页面信息,查找“二级C语言”页面内容,将它以文本文件的格式保存在指定目录下,命名为IE18.txt。
第3题:
当已存在一个test.txt文件时,执行函数fopen("test.txt","r+")的功能是()。
A.打开test.txt文件,覆盖原有的内容
B.打开test.txt文件,可以读取和写入新的内容
C.打开test.txt文件,只能写入数据,但不能读取数据
D.打开test.txt文件,只能读取原有内容,但不能写数据
第4题:
若磁盘上已存在某个文本文件,其全路径文件名为d:\shiti\tes.txt,下列语句中不能打开该文件的是( )。
A.ifstream file("d:\shiti\test.txt");
B.ifstream file("d:\\shiti\\test.txt");
C.ifstream file;file.open("d:\\shiti\\test.txt");
D.ifstream* pFile = new ifstream("d:\\shiti\\test.txt");
第5题:
以“w”方式打开文本文件a:aa.dat,若该文件已存在,则()。
A.新写入数据被追加到文件末尾
B.文件被清空,从文件头开始存放新写入数据
C.显示出错信息
D.新写入数据被插入到文件首部