Skip to content

Category Archives: C++ Programs

Floyd’s triangle is a triangle with first natural numbers. Task is to print reverse of Floyd’s triangle.Examples: Input: 4 Output: 10 9 8 7 6… Read More
Given a quadratic equation in the form ax2 + bx + c, find roots of it.  Examples : Input  :  a = 1, b =… Read More
Prerequisite: Maps Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two… Read More
In this article, we learn how we can convert float to string in C++ using different methods:  Using the to_string() Using stringstream Using Macros Using… Read More
Here, we will see how to convert scientific notations to decimals using a C++ program. Example: 1e9 = 1000000000 1e9 = 1000000000.000000 Calculate power using… Read More
Obtaining the color information about the screen pixels is a common operation performed by automation software, which relies on activity on the screen. The process… Read More
Prerequisite: Basic operators in C++ Switch Case  Vector in C++ Class and Objects in C++ Trading is a primary economic concept that involves buying and… Read More
Getting the list of files in a directory is one of the most common operations performed by the Filesystem of an OS. The file explorer… Read More
Prerequisites: Install C++17 or Newer Standard Compiler It is a common requirement of users to extract filenames and their extensions from a given path. The… Read More
strpbrk() is a string function in C++ STL that takes in two strings and finds the first occurrence of any character of string2 in string1.… Read More
The task is to hide and Show the console window of a C++ program. The program for the same is given below. Note: The results… Read More
Prerequisite: Chrono Library in C++ The task is to calculate the running time of a program in Microseconds in C++ Header file:   #include<chrono> The… Read More
The octal numeral system, or oct for short, is the base-8 number system and uses the digits 0 to 7, that is to say, 10… Read More
__builtin_popcount()  is a built-in function of GCC compiler. This function is used to count the number of set bits in an unsigned integer.  Syntax: __builtin_popcount(int… Read More
In this article, we will learn how to convert String To Float/Double And Vice-Versa. In order to do conversion we will be using the following… Read More