File Handling Flashcards
1
Q
To open a file to read
A
F= openRead(“filename.txt”)
2
Q
To open a file to write
A
F= openWrite(“filename.txt”)
3
Q
To read a line from a file
A
FileContent= F.readLine()
4
Q
To return the end of a file
A
endOfFile()
5
Q
To write a line to a file
A
F.writeLine(“Nick is awesome”)
6
Q
To close a file
A
F.close()