Skip to content
Quiz · Pointers · lesson 2 of 8

Quiz — writing through a pointer

What does the program print?

GO
package main

import "fmt"

func main() {
    x := 1
    p := &x
    y := *p
    *p = 5
    fmt.Println(x, y)
}

Subscribe to take the course

The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.

Sign in another way