C++ Programs - Hard Articles
In this article, the task is to draw an ellipse using OpenCV in C++. The ellipse() function from OpenCV C++ library will be used. Syntax:… Read More
There are two methods in which input can be taken in a more secure way: Do not display any content. Display a special character such… Read More
Given an array, arr[] of size N, the task is to find the distinct absolute differences of all possible pairs of the given array. Examples:… Read More
Till now we have seen only static output on the black window in C/C++ without any peripheral device interaction(like mouse). Here static means that interaction… Read More
Given an N-Ary tree, the task is to print all root to leaf paths of the given N-ary Tree. Examples: Input:         … Read More
Online shopping is all about calculating the total amount for the items selected by the customer. In this article, we will discuss a menu-driven C++… Read More
Given an array, arr[] of size N and an integer K ( N % K = 0), the task is find the maximum cost to… Read More
Given two sorted arrays, arr[], brr[] of size N, and M, the task is to merge the two given arrays such that they form a… Read More
Given an array arr[] of size N representing the available denominations and an integer X. The task is to find any combination of the minimum… Read More
Given an array arr[] consisting of N2 integers, the task is to check whether a matrix of dimensions N * N can be formed from… Read More
As we already know, a Binary number system is a number system that has only 2 digits in it, i.e. 0 and 1. Similarly, we… Read More
Given a character matrix arr[][] of dimensions 3 * N, consisting of three characters {#, *, . }, the task is to find the vowels(A,… Read More
Prerequisite: graphics.h, How to include graphics.h?  In C/C++ there is graphics.h header file which is used to create the object like line, circle, etc. Given an… Read More
Given a string S of length N, consisting of lower case alphabets, and queries Q[][] of the form [L, R], the task is to count… Read More
Given a large number in form of string N, the task is to insert a dash between two adjacent odd digits in the given number… Read More
The purpose of the exit() function is to terminate the execution of a program. The “return 0”(or EXIT_SUCCESS) implies that the code has executed successfully… Read More
The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two queens attack each other. For example, the… Read More