# Category Archives: C++ Programs (adsbygoogle = window.adsbygoogle || []).push({});

## Number of quadrilaterals possible from the given points

Given four points (x, y) in the cartesian coordinate. Find the possible no of quadrilaterals than can be formed by joining all the four points.… Read More »

## Program to find N-th term of the series a, b, b, c, c, c,…….

Given a number N. The task is to write a program to find the N-th term in the below series: a, b, b, c, c,… Read More »

## Print the given 3 string after modifying and concatenating

Given three strings(without spaces). The task is to print the new string after modifying the three given string as follows: Replace all the vowels present… Read More »

## Kruskal’s Algorithm (Simple Implementation for Adjacency Matrix)

Below are the steps for finding MST using Kruskal’s algorithm 1. Sort all the edges in non-decreasing order of their weight. 2. Pick the smallest… Read More »

## Prim’s Algorithm (Simple Implementation for Adjacency Matrix Representation)

We have discussed Prim’s algorithm and its implementation for adjacency matrix representation of graphs. As discussed in the previous post, in Prim’s algorithm, two sets… Read More »

## Maximum number of dots after throwing a dice N times

Given a dice with m-faces. The first face of the dice contains a dot, the second one contains two dots, and so on, the m-th… Read More »

## Program to find Nth term in the series 0, 0, 2, 1, 4, 2, 6, 3, 8,…

Given a number N. The task is to write a program to find the N-th term in the below series: 0, 0, 2, 1, 4,… Read More »

## Subtraction of two numbers using 2’s Complement

Given two numbers and . The task is to subtract from by using 2’s Complement method. Note: Negative numbers represented as 2’s Complement of Positive… Read More »

## Program to find Nth term in the given Series

Given a number N. The task is to write a program to find the N-th term in the below series: 1, 1, 2, 3, 4,… Read More »

## Uninitialized primitive data types in C/C++

What do you think happens when you use an uninitialized primitive data type? Well you may assume that the compiler should assign your primitive type… Read More »

## Multi-set for user defined data type

You are given Q queries. Each query contains an integer k and a person’s information i.e, first name, last name, age. For each query, we… Read More »

## Program to Print the Trapezium Pattern

Given ‘num’ which indicates number of lines.The task is to print a trapezium pattern in num lines. Examples: Input : 4 Output : 1*2*3*4*17*18*19*20 5*6*7*14*15*16… Read More »

## How to print N times without using loops or recursion ?

How to print “Hello” N times (where N is user input) without using loop or recursion or goto. Input : N, that represent the number… Read More »

## Relational Operators on STL Array in C++

The article illustrates the working of the different relational operator on the array STL. The equality comparison ( == ) is performed by comparing the… Read More »

## Even digits Sum and Odd digits sum divisible by 4 and 3 respectively

Given a number N represented as a string The task is to print ‘Yes’ if the sum of digits is even and is divisible by… Read More »