
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 33676 Articles for Programming

1K+ Views
Introduction In this tutorial, we will see to write a go language program to rotate an array. We will write two programs for this. One to rotate the array to left and another to rotate it to right. Golang Program to Rotate an Array to Left The following code illustrates how we can rotate an array to left using a user defined function. Algorithm to the above Program Step 1 − Import the fmt package that allows us to print anything on the screen. Step 2 − Create a function named rotateLeft() which returns the final array after rotating it. ... Read More

1K+ Views
Two−dimensional arrays are commonly used in Go. For example, storing data in a table requires a 2D array. In this tutorial, we will be discussing the approach to printing a 2D array in Golang programming. But before writing this code, let’s briefly discuss the two−dimensional array. What is a 2D Array? A 2D array is comprised of rows and columns. Its nature is similar to a normal array with a fixed length. It is homogeneous in nature, i.e., all the elements stored in a 2D array should be of the same data type. If a 2D array has ‘r’ rows ... Read More

4K+ Views
Data plays an essential role when we write programs. It can be stored in multiple ways. For storing a collection of data with the same data type, an array can be used. In this tutorial, we will be discussing the approach to printing an array in Golang programming. But before writing the code for this, let’s briefly discuss the array. What is an Array? An array has a fixed length and its length cannot be altered. It is homogeneous in nature, i.e., all the elements stored in an array should be of the same data type. If an array has ... Read More

928 Views
In this tutorial, we will be discussing the approach to creating a simple class in Golang programming. However, before writing the code for this, let’s briefly discuss the concept of class. What is Class? A class is a template or blueprint for creating objects. A class binds together all the elements of a program and it is an essential part of object−oriented programming. Nevertheless, Go language does not support the ‘class’ keyword unlike other languages like Java, C++, etc. which are object−oriented languages. However, this does not limit Go to using the functionality of a class. Go keeps up with ... Read More

313 Views
In this tutorial, we will discuss the approach to calculating the volume, diagonal and area of a cuboid using its length, breadth and height. But before writing its Golang code, let’s briefly discuss the cuboid and its volume, diagonal and area. Cuboid A cuboid is a three−dimensional figure with six faces and twelve edges. The length, breadth, and height of a cuboid are different unlike a cube whose all sides are equal. A rectangular box is a good example of a cuboid. Volume of a Cuboid The amount of space a cuboid occupies is termed its volume. Calculating the volume ... Read More

558 Views
Before getting into “enum, ” it is essential to know about the popular keyword “const” in typescript. When we declare a variable "const", we cannot change the value assigned to it. So, enums are nothing but a collection of these const data types. We can create enums with the help of the "enum" keyword. Enum is an abbreviation for Enumerations, and each constant variable declared under the enum is called a member of that enum. In this article, we will learn about enums in typescript, their features, and the major types of enums. Features of enum in TypeScript Enums ... Read More

4K+ Views
Array of Integers refers to an array where all the elements are of Integer type. It is alsocalled an Integer array. As per the problem statement we have to create an Integer array and display the array elements where all the array elements are the product of other elements of the array. In this article, we will see how to replace array elements by the product of other array elements by using Java programming language. To show you some instances − Instance-1 int arr[] = { 2, 3, 1, 4, 6 } At Index-0 value will be = 3 * ... Read More

4K+ Views
String refers to a sequence of characters. In Java Strings are objects. To create and manipulate strings Java provides the String class. String class has many inbuilt methods which are used for different purposes. We will perform a few basic string operations by using inbuilt String methods. replace() Method: It replaces a specified character in the given string. concat() Method: It appends another string to the end of one string. length() Method: It returns the length of the given String. Equals() Method: It checks whether two strings are equal or not. In this article, we will see some basic ... Read More

4K+ Views
Array in Java is called as a non primitive data type which stores a fixed number of single type values. It is called a one-dimensional array. Whereas matrix refers to a rectangular array or Two-Dimensional array. In this article, we will see how to perform different matrix operations like addition, subtraction, and multiplication by using Java Menu driven program. We will be implementing the application using a switch case. To show you some instances Instance-1 Suppose we have inserted two different matrices of 2 rows and 3 columns. Then we will perform matrix addition and print the result. Let the ... Read More

3K+ Views
Digits are basically represented in number format or these are integer values. But for pronouncing them we are using words. Every digit has a unique word format. For example, the word format of 1 is “One”. Like that for 2 the word format is “two”, for 3 the word format is “three” ... etc. For two-digit number the number format is little different. 21 represents as “twenty-one”, 45 represents as “forty-five” .... etc. So for all type of number there has a unique word format available. To show you some instances Instance-1 Input number is 15. Word format of 15 ... Read More