Akhil Sharma has Published 671 Articles

Golang Program to Create a Slice of Person Structs Called People with at Least Two Elements

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 15:37:05

64 Views

In this article, we are going to explore how to create a Go program that involves a slice of Person structs named People. The slice will contain a minimum of two elements, representing individuals with their respective names and addresses. By exploring the concept of slices and their usage in ... Read More

Golang Program Prints a Person's Name and Address by Taking Person Struct as a Parameter

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 15:34:46

115 Views

Throughout this article, we will dive into the details of implementing the PrintPerson function, understanding the structure of a Person, and executing the program to obtain the desired output. So, let's get started and learn how to utilize Go's features to print person details effectively. In this article, we will ... Read More

Golang Program to Create an Interface Named Reader That Defines a Read Method

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 15:32:47

73 Views

In this go-language article, we are going to create an interface named Reader that defines the read method using direct interface implementation, and interface Composition along with examples to elaborate on the concept. A read method in go language is used to read the data from a source. Syntax sw.data ... Read More

Golang Program to Create an Interface Named Worker That Defines a Work Method

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 15:28:07

56 Views

The work method in the go language is a user-defined method for custom data types to perform various operations. You can choose any name but functionality will depend on the specific requirement. The Worker interface can be executed by different sorts to supply distinctive usage of the Work behavior. Here ... Read More

Golang Program to Create an Interface Named Animal That Defines a Speak Method

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 15:25:04

77 Views

The speak method in golang is obtained by the customized functions that you can define to achieve a specific functionality. Speak is a user-defined function that performs the task for which it is created. In this article, we are going to create an animal interface that defines the speak method. ... Read More

Golang Program That Creates a Channel of Type String And a Goroutine That Sends a Message to The Channel Every 2 Seconds

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 15:22:59

135 Views

In Go, channels are a capable highlight for concurrent programming, empowering communication and synchronization between goroutines. In this article, we are going to investigate how to form a channel of sort string in Go and utilize a goroutine to send messages to the channel at normal intervals of 2 seconds. We ... Read More

Golang Program to Check if a Binary Tree is a Binary Search Tree

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 15:21:18

118 Views

A binary tree is a tree having at most two children whereas a binary search tree is the tree in which the elements in the left side of the tree are less than the elements in the right side of the tree. In this article, we will write Go language ... Read More

Golang Program to Print The Height of a Binary Tree

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 15:20:01

114 Views

A binary tree is a tree which has at most two children and height refers to the no. of levels in the tree. In this article, we will use two examples to find the height of a binary tree. In this Golang article we will write programs to print the ... Read More

Golang Program to Merge Two Sorted Linked Lists

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 15:16:38

236 Views

In this article, we will write Go language programs to merge two sorted linked lists. A linked list is a set of two fields with the value that is the data and the next pointer which points to the next node in the list. A linked list is a dynamic ... Read More

Golang Program To Print Descending Order Pattern

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 15:14:44

55 Views

In this Go language article, we will write programs to print descending order patterns using a nested for loop as well as using the two nested loops inside the outer loop. Descending order pattern means the higher order elements are placed first and in pattern the rows with highest no. ... Read More

Previous 1 ... 4 5 6 7 8 ... 68 Next
Advertisements