Akhil Sharma has Published 507 Articles

Golang Program to pad a string with 0's on left side

Akhil Sharma

Akhil Sharma

Updated on 17-Feb-2023 15:02:10

3K+ Views

In the Go programming language, strings are a built-in data type that represents sequences of characters. They are defined using double quotes (") and can contain any valid Unicode characters. In this article, we are going to learn different techniques to pad a string with 0’s on the left side. ... Read More

Golang Program to get the index of the substring in a string

Akhil Sharma

Akhil Sharma

Updated on 17-Feb-2023 15:00:14

4K+ Views

In the Go programming language, strings are a built-in data type that represents sequences of characters. They are defined using double quotes (") and can contain any valid Unicode characters. A substring is a portion of a string that contains a sequence of characters from the original string. A substring ... Read More

Golang Program to merge two integer arrays without using library function

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 19:08:54

816 Views

An array in go language is defined as the data structure that is used to store elements in contiguous memory locations. Arrays allow us to search and store elements at constant time. arrays use index to store elements which starts from 0 and goes to n – 1, where n ... Read More

Golang Program to convert int type variables to long

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 19:07:41

2K+ Views

In go language a long type variable is not a separate data type but it is an extension made from the integer data type to store even larger types of integers. The main difference between an int data type and long data type is that int data type is 32 ... Read More

Golang Program to cyclically permutes the elements of the array

Akhil Sharma

Akhil Sharma

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

229 Views

Cyclically means that in every cycle we wish to move the array elements by one position till we get the original array again. Cyclic permutation can be useful in various matrix manipulation and linear algebra operations. In this article, we are going to see different examples to permute the elements ... Read More

Golang Program to check a given number is finite or not

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 19:00:37

1K+ Views

In this article we will write a go language program to check if a given number is finite or not. The program uses IsInf() and IsNaN() library functions in order to check whether numbers are finite or not. Syntax func IsInf(f float64, sign int) bool IsInf() function is present ... Read More

Golang Program to delete an item from the array without using the library function

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:58:49

660 Views

An array in go language is defined as the data structure that is used to store elements in contiguous memory locations. Arrays allow us to search and store elements at constant time. arrays use index to store elements which starts from 0 and goes to n – 1, where n ... Read More

Golang Program to calculate the sum of columns of matrix elements

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:50:22

527 Views

A matrix is a collection of numbers arranged in rows and columns, a two-dimensional array, each of the values of this matrix is known as an element. Here we will use three methods to find the sum of column elements and compare each method for the same using go programming. ... Read More

Golang Program to calculate the sum of rows of matrix elements

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:46:50

600 Views

A matrix is a collection of numbers arranged in rows and columns, a two-dimensional array. Here we will use three methods to find the sum of elements and compare each method for the same using Go Programming language. Algorithm Step 1 − Import the fmt package. Step 2 ... Read More

Golang Program to Determine the class of an object

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:46:01

179 Views

What are Objects in Golang? Objects are defined on the structs and store Key-value pairs of data together in go programming. There are numerous methods for producing an object. A struct is a user-defined type that groups together a collection of fields (also known as properties or data members) and ... Read More

Advertisements