Akhil Sharma has Published 671 Articles

Golang Program to insert an item into the array without using library function

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:54:02

96 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 times. arrays use the index to store elements that start from 0 and goes on to n – 1, ... Read More

Golang Program to read and print two-dimensional array

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:53:27

2K+ Views

What is a 2D array? A two-dimensional array is a collection of data that are arranged in rows and columns. In go we can use the for loops to iterate and print elements of the 2d arrays. Here is an example of the same below − 0 1 ... 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

206 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

343 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

73 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

Go language Program to calculate the sum of matrix elements

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:45:05

106 Views

What is a Matrix? A matrix is a collection of numbers that are arranged in rows and columns, which is a two-dimensional array. Here we will use three examples to find the sum of elements and compare each element of the matrix for the same using the Golang program. Algorithm ... Read More

Golang Program to Show Usage of Static keyword in Class

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:34:38

1K+ Views

What is Static Keyword in Golang? The term "static" is used to describe variables, functions, and methods that have a fixed or unchanging value or behavior. In Go, the static keyword does not exist. In go we use the term "variables" to describe the memory locations where data is stored ... Read More

Golang Program to Add Two Complex Numbers by Passing Class to a Function

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:32:02

101 Views

In this article, we will write a go language program to add two complex numbers by passing a class to a function. Here we will create a function to the class that will accept the class as an argument along with its properties and we can easily calculate the sum ... Read More

Golang Program to Print Boundary Elements of a Matrix

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:31:35

88 Views

What is Boundary Elements? In go programming language. the boundary elements of a matrix are the elements that are located on the outer edge of the matrix. They are located at four positions i.e the first row, the last row, the first column and at the last column. In a ... Read More

Golang Program to Sort the 2D Array Across Columns

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:24:11

776 Views

What is 2D array in Golang? In Go programming language, a 2D array is an array of arrays, where each element of the outer array is a simple array itself. The code to declare a 2d array of size 2 X 3 can be done by writing var array [2][3]. ... Read More

Advertisements