题目
A.出错
B.新建这个文件
C.程序不运行
D.出现提示信息
第1题
A.用于输入的文本文件
B.用于输出的文本文件
C.用于输入的二进制文件
D.用于输出的二进制文件
第2题
已知c:\1.txt是一个非空文件,其程序代码如下。 Private Sub Command1_Click() Dim MaxSize,NextChar,MyChat Open"c:\1.txt"For Input As#1 MaxSize=LOF(1) For NextChar=MaxSize To 1 Step-1 Seek #1,NextChar MyChar=Input(1,#1) Next NextChar Print EOF(1) Close #1 End Sub 程序运行后,单击命令按钮,其输出结果为______。
A.True
B.Null
C.0
D.False
第3题
A.Open"c:\File1.txt"ForInputAs#1:DoWhileNotEOF(1):LineInput#1,strLine:Loop
B.Open"c:\File 1.txt"ForInputAs#1:DoWhileEOF(#1):LineInput#1,strLine:Loop
C.FileNo=FreeFile:OpenFileNoForInputAs#1:DoWhileNotEOF(FileNo):LineInput#1,strLine:Loop
D.FileNo=FreeFile:OpenFileNoForInputAs#1:DoWhileEOF(#FileNo):LineInput#1,strLine:Loop
第4题
给定程序的功能是:从键盘输入若干行文本(每行不超过80个字符),并写入文件myfile4.txt中,用-1作为字符串输入结束的标志,然后将文件的内容读出显示在屏幕上。文件的读写分别由自定义函数ReadText和WriteText实现。
[注意] 部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun的横线上填入所编写的若干表达式或语句。
[试题源程序]
include<stdio.h>
include<string.h>
include<stdlib.h>
void WriteText(FILE *);
void ReadText(FILE *);
main()
{
FILE *fp;
if((fp=fopen("myfile4.txt", "W"))==NULL)
{
printf("open fail !!\n"); exit(0);
}
WriteText(fp);
fclose(fp);
if((fp=fopen("myfile4.txt", "r"))==NULL)
printf("open fail !!1\n"); exit(0);
}
ReadText(fp);
fclose(fp);
}
/*********found*********/
void WriteText(FILE (1) )
{
char str[81];
printf("\nEnter string with -1 to end :\n");
gets(str);
while(strcmp(Str, "-1")!=0){
/**********found*********/
fputs((2) , fw);
fputs("\n", fw);
gets(str);
}
}
void ReadText(FILE *fr)
{
char str[81];
printf("\nRead file and output to screen :\n");
fgets(str, 81, fr);
while(!feof(fr)){
/**********found**********/
printf("%s", (3) );
fgets(str, 81, fr);
}
}
第5题
A.FileInputStream fis =new FileInputStream("d://java//1.txt");
B.FileInputStream fis =new FileInputStream("java/1.txt");
C.File file=new File("1.txt");FileInputStream fis =new FileInputStream(file);
D.FileInputStream fis =new FileInputStream(" d://java//1.txt ");
第9题
Word在正常启动之后会自动打开一个名为( )的文档。
(A)1.DOC (B)1.TXT (C)DOC1.DOC (D)文档1
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!