Skip to content

Category Archives: C++ Programs

Given an integer N, the task is to print the Alphabet H Pattern as given below:   1 N 2 * 3 3 * 2 N… Read More
Given an integer d which is the length of the diagonal of a pentagon, the task is to find the area of that pentagon.   Examples:  … Read More
Given string str the task is to expand the string as follows: If the string is abcd, the resultant string will be d, cd, bcd, and… Read More
Given an array of strings dates[], the task is to sort these dates in ascending order. Note: Each date is of the form dd mmm yyyy… Read More
Given a string str, print reverse all words except the first and last words. Examples:  Input : Hi how are you geeks Output : Hi… Read More
Given a cube of side length a. The task is to find the volume of biggest right circular cylinder that can be inscribed within it.Examples:  … Read More
Given an array of N integers. Each element in the array occurs same number of times except one element. The task is to find this… Read More
Given some weights of masses a0, a1, a2, …, a100, a being an integer, and a weighing scale where weights can be put on both… Read More
Given a string str which contains the source code (C/C++/Java code) which is not arranged in a proper way, the task is to format that… Read More
Given three integers a, b and x, the task is to get the multiple of x which is closest to ab.Examples:   Input: a = 5,… Read More
99.9% of the C++ programs use macros. Unless you are making a basic file you have to write #include, which is a macro that pastes… Read More
Given an array of distinct integers arr[], the task is to find a pair which has the minimum sum and print the sum.Examples:   Input: arr[]… Read More
Given two arrays of positive integers A and B of sizes M and N respectively, the task is to push A[i] + B[i] into a… Read More
Given string str, the task is to check whether every group of consecutive a’s is followed by a group of consecutive b’s of the same… Read More
Give an array of positive integers. The task is to find the total sum after performing the bitwise OR operation on all the sub-arrays of… Read More

Start Your Coding Journey Now!