Skip to content

Category Archives: C++ Programs

Vectors: Vectors are containers similar to dynamic arrays with the ability to resize when a new element is inserted or deleted from it. It is… Read More
Map in STL: Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No… Read More
A user-defined data types are designed by the user to suit their requirements, the compiler does not support automatic type conversions for such data types… Read More
Given two integers A and B, the task is to find the maximum of two numbers using Bitwise Operators. Examples: Input: A = 40, B… Read More
Given a strings S length N consisting of only ‘a’, ‘b’ and ‘c’. The task is to check if it is possible to permute the… Read More
Header Guards in C++ are conditional compilation directives that help to avoid errors that arise when the same function or variable is defined more than… 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
Pre-requisite: Hamming Code Given a message bit in the form of an array msgBit[], the task is to find the Hamming Code of the given… Read More
If-Else is a decision-making statement, where the result will be either true or false. If the statement accepts boolean values – if the value is… Read More
Prerequisite: How to include graphics.h?, graphics.hThe task is to draw an ellipse that is intersected by a straight line passing through the center of the… Read More
As we know that new is used to create memory dynamically and it is the programmer’s responsibility to delete the memory location explicitly and it… Read More
sizeof() is commonly used operator in the C or C++. It is a compile-time unary operator that can be used to compute the size of… Read More
Run-time Constant: These are the constants whose respective values can only be known or computed at the time of running of source code. Run time… Read More
In this article, we will discuss the ways to compare a variable with values. Method 1: The idea is to compare each variable individually to… Read More
 In C++, we can overload the comma operator using Operator Overloading. For Example: For “Send the query X to the server Y and put the… Read More

Start Your Coding Journey Now!