Skip to content
Quiz · Functions · lesson 2 of 10

Quiz — changing a parameter

What does the program print?

GO
package main

import "fmt"

func inc(n int) int {
    n++
    return n
}
func main() {
    x := 1
    fmt.Println(inc(x), x)
}

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