Identify the CORRECT statement with respect to the code given below:
//Assume all necessary imports are done
package main
import ("fmt")

func main() {
var a int
var b int = 2
var c = 3
d := a + b
fmt.Println(d)
}

The output would be 2 as the variable a will have the default value of 0

The output can be anything as the variable a is not initialized

Error in code as the declaration of variable ā€˜cā€™ is not proper

Error in code as variable ā€˜cā€™ is declared but not used

Verified Answer
Correct Option - d

To get all Infosys Certified Go Programmer Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in