Posts from C++

std::exchange in C++

By Lakshya Narain

In this tutorial, you would understand what is std::exchange and how is it used in C++. The purpose of std::exchange is that it returns the old value of the particular variable and.... Read More

C++ program to find the depth of a N-ary Tree

By Saksham Agarwal

In this blog, today we’ll try to find the maximum depth of an array given an N-ary Tree in C++. WHAT IS AN N-ARY TREE? An N-ary Tree is a tree in which every vertex has no mo.... Read More

Count Occurrences of a specific word in a string in C++

By Lakshya Narain

In this tutorial, we will learn how to count occurrences of a specific word in a given sentence in C++. We are given a sentence containing the word we are to find, and we are suppo.... Read More

Palindrome string check using Recursion in C++

By Gaurav Sharan

In this tutorial, we will learn how to check whether a String is a Palindrome or not using Recursion in C++. A string is said to be Palindrome if the original string and its revers.... Read More

Reverse an Array using Recursion in C++

By Gaurav Sharan

In this tutorial, we will learn how to reverse the elements of an array using Recursion in C++. When a function calls itself then the function is known as a Recursive Function and .... Read More

localtime() function in C++ with an example

By Shubhobroto Mukherjee

In this tutorial, we will learn about what is localtime() function in c++ is, we want to make this tutorial easy to understand for you and learn in-depth concepts of such function .... Read More

Check if a variable is an array or not using C++

By Arjun Singh

In this tutorial, we will learn how to check if a variable is an array or not in C++. An array contains a collection of the same type of variables. The array is created for example.... Read More

Fetch_sub() in C++ example

By Arjun Singh

Fetch_sub() in C++ provides operational support for the type to do atomic addition and subtraction on a stored address. Fetch_sub() in C++ The operation work in the same ways as it.... Read More