Posts from C++

Convert an int array to a string in C++

By YANNAM SATYA AMRUTHA

In this article, we will discuss some approaches to converting an integer array into a string in C++ along with some examples. Below are the multiple methods to do so: Using to_str.... Read More

Operators Precedence in C++ :

By YANNAM SATYA AMRUTHA

In this article, we will discuss the operator’s precedence in C++. We generally solve mathematical expressions which have many operators. Similarly, C++ provides us with diff.... Read More

Check if a graph is bipartite or not in C++

By Khushi Aswani

In this tutorial, we will dive into the understanding of a graph and check whether a graph is bipartite or not in C++. For this, we first need to clearly understand a bipartite gra.... Read More

How to sort an array in descending order in C++

By HARI HARAN B

Sorting a sequence is a problem of great importance in computer science and software development. This article describes the methods to sort both a normal array and the STL array c.... Read More

Find number of days between two dates in C++

By YANNAM SATYA AMRUTHA

In this article, let us discuss an efficient method to calculate the number of days between any two dates in C++. Here we are going to consider the Gregorian calendar, which has 12.... Read More

How to generate a random number in C++

By Aakanksha Thakar

This tutorial will see how to generate a random number in C++. To generate random numbers rand()function is used. This is a predefined function in the cstdlib library. It generates.... Read More

How to find index of largest element in an array C++

By HARI HARAN B

Finding the index of the largest element in an unsorted array is done through brute force search. If the array is sorted the task is trivial and the index is the length-1 if it’s.... Read More

Shift binary numbers in C++

By YANNAM SATYA AMRUTHA

In this article let’s discuss how we can shift the binary numbers with the help of some example codes in C++. Shift operations are bit-wise operations because we perform thes.... Read More