Skip to content

Instantly share code, notes, and snippets.

View 100daysofdevops's full-sized avatar
🎯
Focusing

100daysofdevops

🎯
Focusing
View GitHub Profile
package main
import "fmt"
func main() {
var students [3] string
students[0] = "Ram"
students[1] = "Shyam"
students[2] = "Mohan"
fmt.Printf("Length of an array: %v\n", len(students))
package main
import "fmt"
func main() {
var students [3] string
fmt.Printf("Students: %v\n", students)
students[0] = "Ram"
students[1] = "Shyam"
students[2] = "Mohan"
package main
import "fmt"
func main() {
grades := [3]int{50, 45, 70}
fmt.Printf("Grades: %v\n", grades)
}
package main
import "fmt"
const (
x = iota
y = iota
z = iota
)
func main() {
package main
import "fmt"
const x = iota
func main() {
fmt.Println(x)
}
package main
import "fmt"
func main() {
s := "Hello World"
b := []byte(s)
fmt.Println("%v", b)
}
package main
import "fmt"
func main() {
s1 := "hello"
s2 := " Prashant"
fmt.Println(s1+s2)
}
package main
import "fmt"
func main() {
x := "hello world"
x[3] = "P"
fmt.Printf("%v %T \n",x , x)
}
package main
import "fmt"
func main() {
x := "hello world"
fmt.Printf("%v %T \n",string(x[3]) , x[3])
}
package main
import "fmt"
func main() {
x := "hello world"
fmt.Printf("%v %T \n",x[3] , x[3])
}