Skip to content

Category Archives: C++

Given a 2D array, print it in reverse spiral form. We have already discussed Print a given matrix in spiral form. This article discusses how… Read More
Member Function: It is a function that can be declared as members of a class. It is usually declared inside the class definition and works… Read More
Given an array of positive and negative numbers, find if there is a subarray (of size at-least one) with 0 sum. Examples :  Input: {4,… Read More
Switch case statements are a substitute for long if statements that compare a variable to several integral values. The switch statement is a multiway branch… Read More
Prerequisites: lvalue reference rvalue reference Copy Semantics (Copy Constructor) References: In C++ there are two types of references- lvalue reference: An lvalue is an expression… Read More
The lower_bound() method of C++ returns the index of the first element in the array which has a value not less than the key. This… Read More
Incedo Inc. visited our college, SRM Institute of Science and Technology in August’21, and everything was conducted in virtual mode. I applied for the role… Read More
Given an array arr[ ] of size N and an integer p, the task is to find maximum possible value of rightmost element of array… Read More
Given three variables that represent the hours, minutes, and the second, the task is to write a C++ program to normalize/convert the given time into… Read More
Pre-requisite: if-else This article focuses on discussing what happens when the print statement is used inside the if-else conditional statement. For example: Consider the below… Read More
Forward list in standard template library of C++. It comes under #include<forward_list> header file. It is implemented as a singly linked list. It was introduced… Read More
In C graphics, the graphics.h functions are used to draw different shapes like circles, rectangles, etc, display text(any message) in a different format (different fonts… Read More
Float is a 32 bit IEEE 754 single-precision Floating Point Number 1 bit for the sign, (8 bits for the exponent, and 23* for the… Read More
All variables use data type during declarations to restrict the type of data to be stored. Therefore, we can say that data types are used… Read More
An array is a collection of items stored at contiguous memory locations. It is to store multiple items of the same type together. This makes… Read More