Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. var x [5]int //Cada elemento será inicializado com valor '0' ("zero value")
  2.  
  3. y := [5]int{1, 3, 5, 7, 9} //Verboso e informando os valores
  4.  
  5. z := [...]int{2, 4, 6, 8, 8} //Só pra não informar o tamanho e deixar o compilador contar
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement