Skip to content

Category Archives: C++ Programs

An array in any programming language is a collection of similar data items stored at contiguous memory locations and elements can be accessed randomly using… Read More
Given a lower triangular matrix Mat[][], the task is to store the matrix using column-major mapping. Lower Triangular Matrix: A Lower Triangular Matrix is a… Read More
Given a rectangular matrix mat[][] with N rows and M columns, the task is to rotate the matrix by 90 degrees in a clockwise direction… Read More
While programming, there is often a piece of code that needs to be written repetitively. For example, loops (for loop, while loop, do-while loop), or… Read More
In computers, graphics.h can be used to provide direct functions to draw different coordinates, like circles, rectangles, etc. Using these shapes, different objects can be… Read More
In C/ C++, like normal data pointers(int *, char *, etc), there can be pointers to functions. Every function created in a program gets an… Read More
In this article, we will discuss how the variable-length argument works. Variadic function Calling convention Memory layout of C/C++ program Negative subscript Variadic Function: A… Read More
C++ has in its definition a way to represent a sequence of characters as an object of a class. This class is called std::string. String… Read More
Given a set S consisting of N integers and an element K, the task is to find the index of the element K in the… Read More
The numeric_limits class template provides an easy and standardized way to query various properties of arithmetic types. For example, the maximum value a type T… Read More
In this article, two unique and different ways of accessing an element from an array rather than the conventional arr[i] expression are discussed below. Using… Read More
The std::string has some demerits, one of the most common situations is constant strings. Below is the program that demonstrates the problem that occurs in… Read More
In this article, we will discuss the problem of initialization in C++, the data members of a class have private scope by default, so they… Read More
C++ is a powerful language. In C++ we can write a structured program and object-oriented program also. In this article, we will focus on dynamic_cast… Read More
C++ is a powerful language. In C++ we can write structured programs and object-oriented programs also. C++ is a superset of C and therefore most… Read More

Start Your Coding Journey Now!