Search Header Logo
J277.2.2.3.The basic file handling operations.

J277.2.2.3.The basic file handling operations.

Assessment

Presentation

Computers

10th - 11th Grade

Hard

Created by

Ian Currie

FREE Resource

4 Slides • 8 Questions

1

J277.2.2.3.The basic file handling operations.

by Mr. Shingari

2

​Walt

​Understand the basic file operations

3

4

Multiple Select

Which of the following files opens a file?

1

myFile = openRead("sample.txt")

2

myFile = openWrite("sample.txt")

3

myFile.readLine()

4

myFile.close()

5

myFile.writeLine()

5

Multiple Select

Which of the following files opens a file to be read?

1

myFile = openRead("sample.txt")

2

myFile = openWrite("sample.txt")

3

myFile.readLine()

4

myFile.close()

5

myFile.writeLine()

6

Multiple Select

Which of the following files opens a file to be written to?

1

myFile = openRead("sample.txt")

2

myFile = openWrite("sample.txt")

3

myFile.readLine()

4

myFile.close()

5

myFile.writeLine()

7

Multiple Select

Which of the following reads a line from a file?

1

myFile = openRead("sample.txt")

2

myFile = openWrite("sample.txt")

3

myFile.readLine()

4

myFile.close()

5

myFile.writeLine()

8

Multiple Select

Which of the following writes a line to a file?

1

myFile = openRead("sample.txt")

2

myFile = openWrite("sample.txt")

3

myFile.readLine()

4

myFile.close()

5

myFile.writeLine("Hello World")

9

Multiple Select

Which of the following closes a file?

1

myFile = openRead("sample.txt")

2

myFile = openWrite("sample.txt")

3

myFile.readLine()

4

myFile.close()

5

myFile.writeLine("Hello World")

10

Multiple Select

Which of the following blocks of code will open and read each line from a file?

1
2

11

Multiple Select

What does the code MyFile.endOfFile() do?


Answers: 2

1

Closes the file

2

Returns true if we have reached the end of the file?

3

Returns false if we have not reached the end of the file?

12

​File handling operations

​Easy challenges: page 38

​Medium challenges: page 39

J277.2.2.3.The basic file handling operations.

by Mr. Shingari

Show answer

Auto Play

Slide 1 / 12

SLIDE