Akhil Sharma has Published 671 Articles

Golang Program to find the index of the first occurrence of the specified item in the array

Akhil Sharma

Akhil Sharma

Updated on 09-Feb-2023 15:48:38

506 Views

In this article we will write a go language program to find the index of the first occurrence of the specified item in an array. we will use for loops and inbuilt go library functions to achieve the result. Method 1: Using SearchInts() Library Function Syntax func Sort(data Interface) ... Read More

Golang Program to insert multiple elements into the array from the specified index

Akhil Sharma

Akhil Sharma

Updated on 09-Feb-2023 15:45:50

851 Views

In this tutorial, we will write a go language program to insert multiple elements into an array at the specified index. There are many methods to add elements into an array. it can be done by either using indexing or by using for loops. There are some inbuilt functions too ... Read More

Golang Program to insert an element into the array at the specified index

Akhil Sharma

Akhil Sharma

Updated on 09-Feb-2023 15:41:17

2K+ Views

In this tutorial, we will write a go language program to insert an element into an array at the specified index. There are many methods to add elements to an array. it can be done by either using indexing or by using for loops. There are some inbuilt functions too ... Read More

Golang Program to find the uncommon elements from two arrays

Akhil Sharma

Akhil Sharma

Updated on 09-Feb-2023 15:39:05

276 Views

In this tutorial, we will see to write a go language program to find uncommon elements in two arrays. In this article we will write two programs. In the first program we will use the array of strings while in the second one we will use the array of integers. ... Read More

Golang Program to reverse the elements of the array using inbuilt function

Akhil Sharma

Akhil Sharma

Updated on 09-Feb-2023 15:34:11

832 Views

In this tutorial, we will write a go language program to reverse the elements of the array using inbuilt functions. in this program we will see how we can reverse an array of strings and integers using internal go functions. Method 1: Using Append() and Make() Function Syntax func make ... Read More

Golang Program to convert Binary to Octal

Akhil Sharma

Akhil Sharma

Updated on 09-Feb-2023 15:28:42

191 Views

In this article you will learn the go language code to convert binary number to octal number. Binary numbers are the numbers that have base 2, i.e., each digit can have only 2 possibilities 0 and 1. Octal numbers are the numbers that have base 8, i.e., each digit can ... Read More

Golang Program to find the common elements from two arrays

Akhil Sharma

Akhil Sharma

Updated on 09-Feb-2023 15:16:14

785 Views

In this tutorial, we will see to write a go language program to find common elements in two arrays. In this article we will write two programs. in the first program we will use the array of strings while in the second one we will use the array of integers. ... Read More

Golang Program to get the first given number of items from the array

Akhil Sharma

Akhil Sharma

Updated on 09-Feb-2023 15:11:13

101 Views

In this tutorial, we will write a go language program to get the first given number of items from an array. We can do this by either using the inbuilt functions in go or by using for loops. The first method is more efficient in functionality than the second one ... Read More

Golang program to show overriding of methods in classes

Akhil Sharma

Akhil Sharma

Updated on 01-Feb-2023 19:17:40

2K+ Views

When a method is overridden in Go, a new method with the same name and receiver type as an existing method is created and used in place of the existing one. As a result, Golang may provide polymorphism, allowing different implementations of a same method to be used depending on ... Read More

Golang program to show overloading of methods in class

Akhil Sharma

Akhil Sharma

Updated on 01-Feb-2023 19:16:13

2K+ Views

In this article, we will learn how to overload the method in class using different example. Go programming language does not have concept of a class so function overloading will be used to execute the program. As a result, code can be more flexible and readable. As an illustration, you ... Read More

Advertisements