// For more tutorials: https://blog.learngoprogramming.com // // Copyright © 2018 Inanc Gumus // Learn Go Programming Course // License: https://creativecommons.org/licenses/by-nc-sa/4.0/ // package main // --------------------------------------------------------- // EXERCISE: Declare empty arrays // // 1. Declare and printf the following arrays: // // 1. A string array with 4 items // 2. An int array 5 items // 3. A byte array with 5 items // 4. A float64 array with 1 item // 5. A bool array with 4 items // 6. A byte array without any items // // 2. Print the types of the previous arrays. // // NOTE // You should use printf with #v verb. // // EXPECTED OUTPUT // names : [4]string{"", "", "", ""} // distances: [5]int{0, 0, 0, 0, 0} // data : [5]uint8{0x0, 0x0, 0x0, 0x0, 0x0} // ratios : [1]float64{0} // switches : [4]bool{false, false, false, false} // zero : [0]bool{} // names : [4]string // distances: [5]int // data : [5]uint8 // ratios : [1]float64 // switches : [4]bool // zero : [0]bool // --------------------------------------------------------- func main() { }