What will be the output for the below-mentioned code snippet?
package main

import "fmt"
func main() {
var prog string = " "
for ele, _ := range "Hello World" {
if(ele=='m' || ele=='w'){
prog += string(ele)
}
}
sum :=0
for index, _ := range prog{
sum += index;
}
fmt.Println(sum)
}

1

10

0

7

Verified Answer
Correct Option - c

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