对
错
第1题:
在UNIX操作系统中,当用户执行如下命令Link("/user/include/myfile.sh","/usr/userwang/youfile.sh")则文件名"/usr/userwang/youfile.sh"存放在______。
A.user目录文件中
B.include目录文件中
C.userwang目录文件中
D.youfile.sh的文件内容中
第2题:
以下不能正确创建输出文件对黎并使其与磁盘文件相关联的语句是( )。
A.ofstreammyfile;myfile.open("d:ofile.txt");
B.ofstream*myfile=newofstream;myfile->open("d:ofile.txt”);
C.ofstreammyfile("d:ofile.txt");
D.ofstream*myfile=new("d:ofile.txt");
第3题:
下面创建一个新文件对象方法错误的是( )。
A.File myFile; myFile=new File("mulu/file");
B.File myFile=new File();
C.myFile=new FileC/mulu","filel");
D.File myDir=new file("/mulu"); myFile=new File(Dir, "filer');
第4题:
此题为判断题(对,错)。
第5题:
在UNIX操作系统中,当用户执行如下命令Link("/user/include/myfile.sh","/usr/userwang /youfile.sh")则文件名"/usr/userwang/youfile.sh"存放在(21)。
A.user目录文件中
B.include目录文件中
C.userwang目录文件中
D.youfile.sh的文件内容中
第6题:
以下不能正确创建输出文件对象并使其与磁盘文件相关联的语句是
A.ofstream myfile:myfile, open("d:ofile.txt");
B.ofstream *myfile=new ofstream;myfile->open("d;ofile.txt");
C.ofstream myfile("d:ofile.txt");
D.ofstream *myfile=new ("d:ofile.txt");
第7题:
请把下述代码加上异常处理。
int MyWriteFile(CString strFileName, CString strText)
{
int nRet = 0;
CFile myFile;
myFile.Open(strFileName, CFile::modeWrite|CFile::shareExclusive|CFile::modeCreate,
NULL);
int nLen = strText.GetLength();
myFile.Write((char*)(LPCSTR)strText, nLen);
myFile.Close();
return nRet;
}
第8题:
Which UNIX command creates a symbolic link named myfile in the current directory to the file/etc/hosts?
A.In -s/etc/hosts myfile
B.In -s myfile/etc/hosts
C.link -s/etc/hosts myfile
D.link -s myfile/etc/hosts
第9题:
A.type myfile
B. type -q myfile
C. file myfi1e
D.whatis myfile
第10题:
A. 可读可写
B. 可读可执行
C. 只读
D. 可读可写可执行