要打开一个已存在的非空文件file.txt用于修改,正确的语句应为( )。 A: fp = fopen("file.txt","w" ); B: fp = fopen("file.txt", "w+" ); C: fp = fopen("file.txt", "r" ); D: fp = fopen("file.txt", "r+" );
要打开一个已存在的非空文件file.txt用于修改,正确的语句应为( )。 A: fp = fopen("file.txt","w" ); B: fp = fopen("file.txt", "w+" ); C: fp = fopen("file.txt", "r" ); D: fp = fopen("file.txt", "r+" );
下列打开文件的语句中,能对打开文件进行写操作的选项包括( )。 A: fstream f("file.txt"); B: ofstream f("file.txt"); C: ifstream f("file.txt"); D: ifstream f("file.txt",ios::out);
下列打开文件的语句中,能对打开文件进行写操作的选项包括( )。 A: fstream f("file.txt"); B: ofstream f("file.txt"); C: ifstream f("file.txt"); D: ifstream f("file.txt",ios::out);
以长格式列出当前用户家目录下文件名以file开头,跟着2到5之间的一个数字的所有文件(提示,结合ls 命令) A: ls -l ~/file[2-5]* B: find ~ -name "file[2-5]*" C: find ~ -name "file[2-5]*" -exec ls -l {} ; D: ls -a ~/file[2-5]* E: ls -l ~/file[2-5] F: find ~ -name "file[2-5]?"
以长格式列出当前用户家目录下文件名以file开头,跟着2到5之间的一个数字的所有文件(提示,结合ls 命令) A: ls -l ~/file[2-5]* B: find ~ -name "file[2-5]*" C: find ~ -name "file[2-5]*" -exec ls -l {} ; D: ls -a ~/file[2-5]* E: ls -l ~/file[2-5] F: find ~ -name "file[2-5]?"
txt = open(""book.txt"", ""r"") print(txt)txt.close()" "文件 book.txt 在当前程序所在目录内,其内容是一段文本:book,上述代码的输出结果是( ) A: txt B: book C: 其余答案都不对 D: book.txt
txt = open(""book.txt"", ""r"") print(txt)txt.close()" "文件 book.txt 在当前程序所在目录内,其内容是一段文本:book,上述代码的输出结果是( ) A: txt B: book C: 其余答案都不对 D: book.txt
以下通过JSP的include指令来引入这些抽取出的JSP页面方式正确的是( ) A: < %@include file="head.jsp"% > B: <%@include file="head.jsp"%> C: <% @include file="head.jsp"%> D: <%@ include file="head.jsp"%>
以下通过JSP的include指令来引入这些抽取出的JSP页面方式正确的是( ) A: < %@include file="head.jsp"% > B: <%@include file="head.jsp"%> C: <% @include file="head.jsp"%> D: <%@ include file="head.jsp"%>
定义fp为文件型指针变量,以读写方式打开一个已存在的文本文件test.dat,下面fopen函数正确的调用方式是: A: FILE *fp; fp=fopen("test.dat", "rb"); B: FILE*fp; fp=fopen("test.dat", "r+"); C: FILE *fp; fp=fopen("test.dat", "r"); D: FILE *fp; fp=fopen("test.dat", "rb+");
定义fp为文件型指针变量,以读写方式打开一个已存在的文本文件test.dat,下面fopen函数正确的调用方式是: A: FILE *fp; fp=fopen("test.dat", "rb"); B: FILE*fp; fp=fopen("test.dat", "r+"); C: FILE *fp; fp=fopen("test.dat", "r"); D: FILE *fp; fp=fopen("test.dat", "rb+");
下列方法中,能正确创建 JavaScript 对象的是( )。 A: var txt = new Object[name:"George",price:25] B: var txt = new Object(name:"George",price:25) C: var txt = new Object{name:"George",price:25} D: var txt = new Object({name:"George",price:25})
下列方法中,能正确创建 JavaScript 对象的是( )。 A: var txt = new Object[name:"George",price:25] B: var txt = new Object(name:"George",price:25) C: var txt = new Object{name:"George",price:25} D: var txt = new Object({name:"George",price:25})
如果要列出当前目录以及子目录下所有扩展名为 .txt的文件,可以使用命令( )。 A: find . –name ".txt" B: ls -d .txt C: . ls *.txt D: find .".txt"
如果要列出当前目录以及子目录下所有扩展名为 .txt的文件,可以使用命令( )。 A: find . –name ".txt" B: ls -d .txt C: . ls *.txt D: find .".txt"
文件test.txt在当前程序所在目录中,文本内容为123,代码如下: txt=open("test.txt","r")print(txt)txt.close()输出结果是( )。 A: 123 B: ['123'] C: 出错 D: txt
文件test.txt在当前程序所在目录中,文本内容为123,代码如下: txt=open("test.txt","r")print(txt)txt.close()输出结果是( )。 A: 123 B: ['123'] C: 出错 D: txt
Which one of the following is a correct way to create a file for both reading and writing using the function fopen ? A: "ab+" B: "wb+" C: "rb+" D: "ab"
Which one of the following is a correct way to create a file for both reading and writing using the function fopen ? A: "ab+" B: "wb+" C: "rb+" D: "ab"