Tom got a task to create a function to update the contact details stored in slice ‘contactDetail’ with the following numbers: “7597925446”,”7597174532”.

Complete the function ‘updateContact’ given below. (Assume all the necessary imports are given)

func updateContact(mobileNo []string) {
_______ // Line 1
_______ // Line 2
}
func main() {
contactDetail := []string{"143-676-2001 |","424-978-2469 |","202-333-1111"}
fmt.Println("Old Contact Details", contactDetail)
_______ //Line 3
fmt.Println("Updated Contact Details", contactDetail)
}

Line 1: mobileNo = "7597925446 |" 

Line 2: mobileNo = "7597174532 |"

Line 3: updateContact(contactDetail)

Line 1: mobileNo[0] = "7597925446 |"

Line 2: mobileNo[1] = "7597174532 |"

Line 3: updateContact(contactDetail)

Line 1: mobileNo[1] = "7597925446 |"

Line 2: mobileNo[0] = "7597174532 |"

Line 3: updateContact(contactDetail)

Line 2: mobileNo = "7597925446 |" 

Line 1: mobileNo = "7597174532 |"

Line 3: updateContact(contactDetail)

Verified Answer
Correct Option - b

To get all Infosys Certified Go Developer 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