Posts from C++

Find pairs in array whose sums already exist in array in C++

By Muskaan Singla

We are given an array. Our task is to find pairs in array whose sums already exist in array in C++. For example, Input: 3 5 7 2 8 9 Output: 3 5 5 2 7 2 3 2 Find pairs in array whos.... Read More

Count number of different character between two strings of equal length in C++

By Shubham Loya

Today, in this tutorial, we will get to know how to count the number of different characters between two strings of equal length in C++. The number of different characters in a str.... Read More

Kill a PID in C++

By YANNAM SATYA AMRUTHA

In this article, we are going to discuss how to kill a process using PID with a help of a C++ program. Each process is uniquely identified using a process id or PID which is repres.... Read More

How to iterate over characters of a string in C++

By YANNAM SATYA AMRUTHA

A string is a continuous sequence of characters. In order to perform some operations on the strings we iterate over the characters of a string. In this article, we are going to dis.... Read More

Print Left View of a Binary Tree in C++

By Ritvik Nimmagadda

In this tutorial, we are going to print the left view of a Binary Tree in C++. Left View of a Binary Tree The left view of a Tree is a set of nodes visible when the tree is looked .... Read More

How to find the size of an array in C++

By Harsh Singh

Here we will see how can we find the size of a given array if the size is not known. Using sizeof() operator: The sizeof() operator returns the size of any data type passed to it. .... Read More

Implementation of static keyword in C++

By Adrika Roy

In this tutorial, we will learn how to implement static keyword in C++.  The keyword ‘static’ in C++ is used with variables and member functions. Static local variable.... Read More

Priests and devils puzzle problem in C++

By Adrika Roy

In this tutorial, we will learn how to implement the priests and devils puzzle/game using C++. PROBLEM: You are given that there are 3 priests and 3 devils who have to cross a rive.... Read More