
Writing files in Go: Smart Go
Interactive Video
•
Architecture
•
University
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Read more
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What function is used to create a new file in Go?
os.AppendFile
os.ReadFile
os.Create
os.Open
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to write text to a file in Go?
WriteString
WriteData
WriteBytes
WriteText
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the 'os.WriteFile' function do?
Appends data to a file
Overwrites a file with new data
Reads data from a file
Deletes a file
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you append data to an existing file in Go?
Use os.ReadFile with append mode
Use os.OpenFile with O_APPEND constant
Use os.WriteFile with append mode
Use os.Create with append mode
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of flushing the write buffer in buffered IO operations?
To close the file
To read data from the buffer
To commit the written data to the file
To clear the buffer
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?