0

Slice (Go Programming Language)

 1 year ago
source link: https://www.geeksforgeeks.org/videos/slice-go-programming-language/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Slice (Go Programming Language)

Slice (Go Programming Language)
Hello world. Welcome to geek for geeks. And
  • 30 Views
  • 11/05/2022

In Go language slice is more powerful, flexible, convenient than an array, and is a lightweight data structure. Slice is a variable-length sequence which stores elements of a similar type, you are not allowed to store different type of elements in the same slice. It is just like an array having an index value and length, but the size of the slice is resized they are not in fixed-size just like an array. Internally, slice and an array are connected with each other, a slice is a reference to an underlying array. It is allowed to store duplicate elements in the slice. The first index position in a slice is always 0 and the last one will be (length of slice – 1).

Slice (Go Programming Language):https://www.geeksforgeeks.org/slices-in-golang/


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK