Similar Collections


In the Go programming language, a slice is a dynamically-sized, flexible view into the elements of an array while an array has a fixed size. In practice, slices are much more common than arrays, it provides convenient and efficient working with sequences of typed data.

Syntax to declare a slice in Golang,

slice_name []T

Where T is the type of the elements.

This study list contains the solved Golang slices programs. Practice these Golang slices programs to learn the slices concepts, these programs contain the solved code, outputs, and the detailed explanation of the statements, functions used in the Golang slices programs.

questions

Title
Golang program to create a slice from an integer array
Golang program to find the length of a slice
Golang program to find the capacity of a slice
Golang program to demonstrate the different ways to create slices
Golang program to create a new slice from the existing slice
Golang program to create a slice using the make() function
Golang program to iterate a slice using \'range\' in \'for\' loop
Golang program to iterate a slice using a range in \'for\' loop without index
Golang program to create and modify created slice
Golang program to sort a slice of integer in ascending order
Golang program to sort a slice of strings in ascending order
Golang program to check a specified slice of integers is sorted or not
Golang program to check a specified slice of strings is sorted or not
Golang program to sort a slice of 64-bit floating-point numbers in ascending order
Golang program to check a specified slice of 64-bit floating-point numbers is sorted or not
Golang program to search an item in ascending order sorted slice
Golang program to search an item in descending order sorted slice
Golang program to search a floating-point number in a sorted slice using SearchFloat64s() function
Golang program to search an integer item in a sorted slice using SearchInts() function
Golang program to search a string in a sorted slice using SearchStrings() function
total questions: 20

Questions

20

Views

336

Best Answers

299

Points

5