Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a Go program to write data to a file and then read it back.

Medium

Problem Statement

Create a Go program to write data to a file and then read it back.

Sample Input

A string Hello, Go! to write into a file named output.txt.

Sample Output

Hello, Go!

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
package main import "fmt" func main() { // Write code to write data to a file and read it back }
Log in or sign up to run or submit your code.Log inSign up
Input
A string Hello, Go! to write into a file named output.txt.
Expected Output
Hello, Go!