
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 26504 Articles for Server Side Programming

940 Views
This tutorial discusses writing a program to find the factorial of a positive number in the Haskell programming language. In this tutorial, we see Program to find the factorial of a positive number using a recursive function. Program to find the factorial of a positive number using an inbuilt function product. Algorithm Steps Take input or initialize a variable to store a positive integer. Implement program logic to find the factorial of a number. Print the resulting factorial. Method: Find The Factorial Of A Positive Number Using A Recursive Function Example Program to find the factorial ... Read More

763 Views
This tutorial discusses writing a program to convert a decimal number into a binary number in the Haskell programming language. Haskell is a Declarative, Strongly Typed, and Functional programming Language. The computations in Haskell are mathematical functions. In a Decimal number system, each number is denoted with numbers ranging from 0-9. This number system is also called as base 10 number system. For example, The number four hundred and ninety-one is represented as 491(4*10^2 + 9*10^1 + 1*10^0). In a Binary number system, each number is represented as numbers ranging from 0-1. This number system is also called as base ... Read More

1K+ Views
Several applications greatly benefit from the use of 2-dimensional arrays or matrices. Numbers are stored in rows and columns of matrices. Using multi-dimensional arrays, we may define 2D matrices in C++ as well. In this post, we'll look at how to use C++ to determine the Normal and Trace of a given matrix. The square root of the total number of elements in the matrix is what is known as the Normal. The trace is made up of all the components that make up the main diagonal. Let's look at the representation of the algorithm in C++ code. Matrix Trace ... Read More

7K+ Views
The utilization of 2-dimensional arrays or matrices is extremely advantageous for several applications. Matrix rows and columns are used to hold numbers. We can define 2D matrices in C++ using multi-dimensional arrays as well. In this article, we'll look at how to use C++ to calculate the diagonal sum of a given square matrix. The matrices have two diagonals, the main diagonal and the secondary diagonal (sometimes referred to as major and minor diagonals). The major diagonal starts from the top-left corner (index [0, 0]) to the bottom-right corner (index [n-1, n-1]) where n is the order of the square ... Read More

10K+ Views
Lexicographic string comparison states the strings are compared in dictionary order. For example, if two strings ‘apple’ and ‘appeal’ are there, the first string will come next because the first three characters ‘app’ are the same. Then for the first string, the character is ‘l’ and in the second string, the 4th character is ‘e’. Since ‘e’ is shorter than ‘l’, it will come first if we arrange them in lexicographic order. Before arranging, the strings are compared lexicographically. In this article, we will see different techniques to compare two strings in a lexicographic manner using C++. Using compare() functions ... Read More

498 Views
A useful tool for string operations is regex. This may be found in virtually all high-level current programming languages, including C++. Regular expressions (Regex) are utilized as general-purpose search patterns. For instance, by constructing a straightforward string known as a regular expression, we may implement password validation logic with at least one capital, one lowercase, one number, one special character, and a total length of at least 8 characters. In this tutorial, we'll look at how to use C++ to display only the first letters of words included within a specified string. Here, we'll look at a sentence that uses ... Read More

3K+ Views
A string is a group of characters. They can be described as character arrays as well. An array of characters can be thought of as strings, and each string has a set of indices and values. The switching of characters at two specified indices in a string is one of the modifications we can sometimes make to strings. In this article, we will see how to swap two characters in a string from two given indices using C++. Syntax char temp = String_variable[ ] String_variable[ ] = String_variable[ ] String_variable[ ] = temp Using indices, ... Read More

2K+ Views
Strings are a collection of characters. We can also say them as character arrays. Considering an array of characters as strings, the strings have specified indices and values. Sometimes we can perform some modification on strings, one such modification is replacing characters by providing a specific index. In this article, we will see how to replace a character from a specific index inside a string using C++. Syntax String_variable[ ] = In C++ we can access the string characters using indices. Here to replace a character with some other character at a specified index, we simply ... Read More

4K+ Views
Arrays are data of the same type stored in contiguous locations in memory. To access or address an array, we use the starting address of the array. Arrays have indexing, using which we can access the elements of the array. In this article, we take a look at methods to iterate over an array. This means accessing the elements that are present in an array. Using for loop The most common method of iterating over an array is using for loops. We use a for loop to iterate through an array in the next example. One thing is to be ... Read More

2K+ Views
This tutorial discusses writing a program to display Fibonacci Series in the Haskell programming language. The Fibonacci series is a sequence in which each number is the sum of the preceding two terms. The Fibonacci series up to five terms is 0 1 1 2 3. In this tutorial we see, Program to print nth fibonacci number. Program to print the first ‘n’ terms in the Fibonacci series. Program to print the first ‘n’ terms in the Fibonacci series using the list comprehension. Program to print the first ‘n’ terms in the Fibonacci series using the map function. ... Read More