Home / CSE MCQs / GO :: Discussion

Discussion :: GO

  1. What is the output of the following code snippet?
    package main
    import "fmt"
    func main() {
     x := 1
     y := &x

     fmt.Println(*y)

     *y = 2
     fmt.Println(x)

    }
  2. A.
    1
    B.
    28
    C.
    15
    D.
    27

    View Answer

    Workspace

    Answer : Option B

    Explanation :



Be The First To Comment