Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Python
21.3K+ articles
Experiences
16.6K+ articles
Interview Experiences
14.1K+ articles
JavaScript
12.2K+ articles
Misc
8.8K+ articles
R Language
3.0K+ articles
R Functions
106+ articles
R-Input/Output
4+ articles
Programming Language
/
C++
/
C++ Programs
C++ Programs
2.4K+ posts
Recent Articles
Popular Articles
Take String as Input in C++
Last Updated: 06 March 2025
Strings are used to store the textual information. Taking a string as input is a very common operation used in almost all fields of programming. In this article, we will l...
read more
C++
C++ Programs
C++ STL Practice Problems
Last Updated: 22 April 2025
Standard Template Library (STL) is a C++ library that provides the built-in implementation of commonly used data structures and algorithms. These components are designed a...
read more
C++
C++ Programs
C++ OOPs Practice Problems
Last Updated: 10 April 2025
OOPs, stands for Object Oriented Programming, is a technique of writing programs using the real-world concepts such as class, objects, encapsulation, inheritance, abstract...
read more
C++
C++ Programs
C++ Compound Data Types Practice Problems
Last Updated: 09 April 2025
C++ Compound data types are those data types that are created from in-built data types to provide a different way to use them. They are created to suite the need of a part...
read more
C++
C++ Programs
C++ Function Practice Problems
Last Updated: 10 April 2025
Functions are the basic building block of the program. They are the block of code that performs a specific task. Function can be executed from anywhere in the program any ...
read more
C++
C++ Programs
C++ Fundamentals Practice Problems
Last Updated: 10 April 2025
Fundamental concepts form the foundation of learning any programming language. They include absolute basic topics such as storing and accessing data, input and output, per...
read more
C++
C++ Programs
How to Insert an Element in a Sorted Vector in C++?
Last Updated: 06 December 2024
In C++, inserting element in a sorted vector should be done such that it preserves the order of elements. In this article, we will learn different methods to insert an ele...
read more
STL
cpp-vector
C++
C++ Programs
CPP Examples
Right Rotation of Vectors in C++
Last Updated: 05 December 2024
Right rotation of a vector involves shifting all elements to the right by a specified number of positions. The elements shifted out from the right end are wrapped around t...
read more
STL
cpp-vector
C++
C++ Programs
CPP Examples
Initialize a Vector with Hardcoded Elements
Last Updated: 05 December 2024
C++ allows us to initialize the vector with hardcoded (predefined) elements. In this article, we will learn how to initialize the vector with predefined elements.The simpl...
read more
STL
cpp-vector
C++
C++ Programs
CPP Examples
How to Remove Elements from a Vector while Iterating in C++?
Last Updated: 03 December 2024
Erasing elements from a vector while iterating can be challenging because removing an element may invalidate iterators or change the size of the vector. In this article, w...
read more
STL
cpp-vector
C++
C++ Programs
How to Initialize a Vector with Zero in C++?
Last Updated: 03 December 2024
Initializing a vector with value zero means assigning the initial value 0 to all elements of vector. In this article, we will learn the different methods to initialize the...
read more
STL
cpp-vector
C++
C++ Programs
How to Find Duplicates in a Vector in C++?
Last Updated: 26 November 2024
In this article, we will learn how to find the duplicate elements in a vector in C++.The easiest way to find the duplicate elements from the vector is by using sort() func...
read more
STL
cpp-vector
C++
C++ Programs
CPP Examples
How to Iterate 2D Vector in C++?
Last Updated: 27 May 2025
Iterating or traversing a 2D vector means accessing each element of the 2D vector sequentially. In this article, we will explore different methods to iterate over a 2D vec...
read more
STL
cpp-vector
C++
C++ Programs
CPP Examples
How to Insert Elements into 2D Vector in C++?
Last Updated: 22 November 2024
In C++, 2D vectors provide several built-in methods to insert elements. The efficiency of the insertion depends on where the insertion occurs. In this article, we will exp...
read more
STL
cpp-vector
C++
C++ Programs
CPP Examples
How to Initialize 2D Vector in C++?
Last Updated: 22 November 2024
Initializing a 2D vector refers to the process of assigning initial values to the elements of a 2D vector. In this article, we will learn different methods to initialize a...
read more
STL
cpp-vector
C++
C++ Programs
CPP Examples
1
2
3
4
...
163
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !