Blog

Welcome to the Blog

Functions in Golang

Functions in Golang

Functions in Golang Functions in Golang are the blocks of code or statements in a program that allows the user to reuse the same code, which saves memory and also improves the readability of the code. A function is generally used to perform a specific task in a program. Input and output are present in…

Loops in Golang

Loops in Golang

Loops in Golang As for the loops in Golang, there is only one loop available and that is “for loop”. There are no loops such as “while” and “do-while” in Golang as there are in other programming languages like C or Java. For Loop A “for loop” is a loop that repeats itself until the…

Decision Control in Golang

Decision Control in Golang

What is Decision Control in Golang? Decision Control in Golang requires the program to evaluate or test one or more conditions, as well as a statement or statements to be executed if the condition is true, and optionally, other statements to be executed if the condition is false. It is similar to making decisions in…

Data Types in Golang

Data Types in Golang

Data types in golang define the type of data a variable is going to store. In Go, the data types are divided into four categories – Basic – Numbers, strings, booleans Aggregate – Arrays, Structs Reference – Pointers, slices, maps, functions, and channels Interface In this tutorial, we will be looking at basic and aggregate…

Variables in Golang

Variables in Golang

What are variables in golang? Variables in golang are used to store a value. Basically, declaring a variable allocates a memory location in Random Access Memory to store a value of a particular data type. It is useful when the user is entering a value in a program. This value should be saved in a…

Golang – Introduction

Golang – Introduction

What is Golang? Golang or Go is an open-source programming language aimed at being simple, dependable, and efficient. In 2007, Google created the Go programming language. Google was developing significantly at the time, and the code used to manage its infrastructure was growing in both size and complexity at the same time. Go was created…

Structure in  C programming

Structure in C programming

A structure in C is defined as a collection of one or more variables possibly of different data types called heterogeneous types grouped together under a single name for convenient handling. Structure helps to organize complicated data, particularly in large programs as they permit a group of related variables to be treated as a unit…

String in C programming

String in C programming

A string in C programming can be defined as a group of characters or an array of characters i.e. a string is any valid variable name and is always declared as an array. The size determines the number of characters that are held by variable string_name. When the compiler assigns a character string to a…

Array in C programming

Array in C programming

An array in C can be defined as memory location under a single variable name i.e. we will define only one variable which is able to hold a finite consecutive memory location for storing all the elements and then we will refer to all the elements by means of a subscript or index variable one…

Loops in C

Loops in C

1. Need for Looping/Iteration Statements Loops in C programming language are used to repeatedly execute a line or a block of code until it obtains the value that the programmer desires. There are three types of loops in C programming: For Loop, While Loop, and Do While Loop. In C, loops can also be used…