• 2022-06-26
    要从磁盘上新建一个名为"c:\t1.txt"的顺序文件,如下语句中正确的是().
    A: F="c:\t1.txt" Open "F" For Append As
    B: 2
    C: F="c:\t1.txt" Open "F" For Output As
    D: 2
    E: Open c:\t1.txt For Output As
    F: 2
    G: Open "c:\t1.txt" For Output As
    H: 2
  • D

    内容

    • 0

      要从磁盘上读入一个文件名为"d:\File.txt"的顺序文件,下面程序段正确的是( ). A: Open d:\File.txt For Input As B: 1 C: Open "d:\File.txt" For Output As D: 2 E: Open "d:\File.txt" For Input As F: 2 G: Open "d:\File.txt" For Append As H: 1

    • 1

      若要将数据添加到一个文件名为“C:\T1.txt”的文本文件,则应使用下列________程序段打开文件。 A: s=r"C:\T1.txt"<br>fp=open(s,"a") B: s = "C:\T1.txt"<br>fp=open("s","a") C: fp=open("C:\T1.txt","a") D: fp=open(C:\\T1.txt, "a")

    • 2

      若要在磁盘上新建一个文件名为"C:T1.txt"顺序文件,则应用下列________程序段。 A: FileOpen(1,"C:T1.txt",OpenMode.Output) B: DimstrFileNameAsStringstrFileName="C:T1.txt"FileOpen(1,"strFileName",OpenMode.Input) C: FileOpen(1,C:T1.txt,OpenMode.Input) D: DimstrFileNameAsStringstrFileName="C:T1.txt"FileOpen(1,"strFileName",OpenMode.Output) E: FileOpen(1,C:T1.txt,OpenMode.Output)

    • 3

      若要从磁盘上读一个文件名为"C:T1.txt"的顺序文件,则应使用下列__________程序段打开文件。 A: DimstrFileNameAsStringstrFileName="C:T1.txt"FileOpen(1,strFileName,OpenMode.Input) B: DimstrFileNameAsStringstrFileName="C:T1.txt"FileOpen(1,"strFileName",OpenMode.Input) C: FileOpen(1,C:T1.txt,OpenMode.Input) D: FileOpen(1,C:T1.txt,OpenMode.Output) E: FileOpen(1,"C:T1.txt",OpenMode.Output)

    • 4

      为了读取数据,需要打开顺序文件“D:\data5.txt”,以下正确的命令是。 A: Open "E:\UserData.txt" For Input As B: 2 C: Open "E:\UserData.txt" For Output As D: 2 E: Open E:\UserData.txt For Output As F: 2 G: Open E:\UserData.txt For Input As H: 1