gokursu/arrays/arrays1.go

10 lines
199 B
Go
Raw Normal View History

2024-01-07 18:09:10 +00:00
package arrays
import "fmt"
func Demo1() {
var numbers [5]int
numbers[2]=50 // second index of the array
fmt.Println(numbers)
fmt.Println(numbers[2]) // will print second index of the array
}