有下面程序 SETTALKOFF CLEAR INPUT""a=""TOa INPUT""b=""TOb t=a a=b b=t ?a,b 当a=20,b=80时,程序运行结果是()
第1题:
A、in_file = open('input.txt','w')
B、in_file = open('input.txt',r)
C、in_file = open('input.txt','r')
D、都不正确
第2题:
使用Do While循环从打开的文件中逐条读取记录。以下能够正确读取数据的程序段是
A.Open "c:\File1.txt" For Input As #1 Do While Not EOF() Line Input #1, strLine Loop
B.Open "c:\File1.txt" For Input As#1 Do While Not EOF(#1) Line Input #1, strLine Loop
C.FileNo=FreeFile Open FileNo For Input As #1 Do While Not EOF(FileNo) Line Input #1, strLine Loop
D.FileNo=FreeFile Open FileNo For Input As #1 DoWhile Not EOF(#FileNo) Line Input #1, strLine Loop
第3题:
有以下程序: #inlucde<stdio.h> main()D)2 3 3 {int n,*P=NULL; *p=&n; printf("input n:");scanf("%d",&p);printf("output n:");printf("%d\n",p); } 该程序试图通过指针P为变量n读入数据并输出,但程序有多处错误,以下语句正确的是( )。
A.int n,*P=NULL;
B.*P=&n;
C.scanf(“%d",&p)
D.printf("%d\n",p);
第4题:
下面程序的输出结果为( )。
CLEAR
第5题:
为了从当前文件夹中读人文件Filel.txt,某人编写了下面的程序:
Private Sub Commandl_Click()
Open“Filel.txt”For Output As#20
Do While NOt EOF(20)
Line Input#20,ch$
print ch
Loop
Close#20
End Sub
程序调试时,发现有错误,下面的修改方案中正确的是
A.在Open语句中的文件名前添加路径
B.把程序中各处的“20”改为“1”
C.把Print ch语句改为Print#20,ch
D.把Open语句中的Output改为Input
第6题:
假定用下面的语句打开文件: Open"Filcl.txt"For Input As#1 则不能正确读文件的语句是( )。
A.Input#1,ch$
B.Line Input#1,ch$
C.ch$一Input$(5,#1)
D.Read#1,ch$
第7题:
下面语句可以关闭系统输入法,请补充完整。
<input ______>
第8题:
要进行随机文件的读写,可使用下面的( )语句。
A.Line Input #和Print#
B.Input #和 Write #
C.Get #和 Put#
D.A、B、C均可
第9题:
有如下程序: CLEAR INPUT“请输入数值:”TO A IF A=10 S=10 END IF S=I ?“S=”,S RETURN 如果输入A的值一定是数值型,那么上面条件选择程序的执行结果为( )。
A.0
B.1
C.由A值决定
D.程序出错
第10题:
在J2EE中,下面的代码中出现编译错误的是()。
A.Filef=newFile("/","autoexec.bat");
B.DataInput Streamdin=new Data Input Stream(new File Input Stream("autoexec.bat"));
C.Input Stream Readerin=new Input Stream Reader(System.in);
D.Output Stream Writer out=new Output Stream Writer(System.in);