Skip to content

Category Archives: C++ Programs

A cube is a 3-dimensional box-like figure represented in the 3-dimensional plane. Cube has 6 squared-shape equal faces. Each face meets another face at 90… Read More
Given two positive integers i.e, the length and breadth of the rectangle, the task is to find the length of the Diagonal of a Rectangle.… Read More
A Queue is a linear structure that follows a particular order in which the operations are performed. The order is First In First Out (FIFO).… Read More
There are three ways to convert char* into string in C++. Using the “=” operator Using the string constructor Using the assign function 1. Using… Read More
Given an integer, the task is to find the largest prime number that can be made out of that. If we consider the integer as… Read More
Here, we will find out the unicode code point at a given index using a C++ program. Input:  arr = "geEKs" Output:  The Unicode Code… Read More
C++ allows Multithreading by using the ‘thread’ header file. The program acts as one thread but to increase program execution time/performance we can use threads… Read More
As we are given two paths of two files, we have to compare these two paths and check whether they are equal or greater or… Read More
Here we will build a C++ Program To Print Right Half Pyramid Pattern with the following 2 approaches: Using for loop  Using while loop Input:… Read More
Exceptions are run-time errors or abnormal conditions that a program may encounter during execution. Examples: Division by zero Access to an array out of its… Read More
Here, we will build a C++ program to print the left half of pyramid pattern using 2 approaches i.e. Using for loop Using while loop… Read More
Here, we will build a C++ program to print the hollow star pyramid diamond shape pattern that can be achieved with two approaches i.e. Using… Read More
Here, we will build a C++ program for double to string conversion using various methods i.e. Using to_string Using stringstream Using sprintf Using lexical_cast We… Read More
Here, we will build a C++ program to append a string in an existing file using 2 approaches i.e. Using ofstream Using fstream C++ programming… Read More
Unreachable code is a compile-time error in languages like C++, Java, and C or Unreachable code error occurs when the code can’t be compiled; but… Read More

Start Your Coding Journey Now!