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
Misc
8.8K+ articles
Arrays
6.5K+ articles
C++
4.3K+ articles
C++ Programs
2.4K+ articles
C Language
1.8K+ articles
STL
1.3K+ articles
CPP Examples
714+ articles
cpp-pointer
94+ articles
cpp-array
173+ posts
Recent Articles
Popular Articles
How to Find the Cumulative Sum of Array in C++?
Last Updated: 19 March 2024
In C++, the cumulative sum, also known as the prefix sum of an array is the sum of all elements of the array at the current index including the sum of the previous element...
read more
C++ Programs
C++
Picked
cpp-array
CPP Examples
Difference Between Stack-Allocated and Heap-Allocated Arrays
Last Updated: 03 April 2024
In C/C++, arrays can be allocated in two areas of memory: the stack and the heap. Each has its own characteristics and use cases. In this article, we will see the key diff...
read more
C++ Programs
C++
Picked
c-array
cpp-array
C-Arrays
C-Dynamic Memory Allocation
CPP Examples
How to Create a Deque of Arrays in C++?
Last Updated: 27 March 2024
In C++, a deque (double-ended queue) is a data structure that allows insertion and deletion at both ends whereas arrays are fixed-size collections of elements. In this art...
read more
C++ Programs
C++
Picked
STL
cpp-array
cpp-deque
CPP Examples
How to Print an Array in C++?
Last Updated: 12 May 2024
In C++, an array is a fixed-size linear data structure that stores a collection of elements of the same type in contiguous memory locations. In this article, we will learn...
read more
C++ Programs
C++
Picked
cpp-array
C++ Array Programs
CPP Examples
How to Loop Over an Array in C++?
Last Updated: 21 May 2024
In C++, an array is a data structure that stores elements of similar type in contiguous memory locations. We can access the elements of an array using array indexing. In t...
read more
C++ Programs
C++
Picked
cpp-array
CPP Examples
How to Dynamically Allocate an Array in C++?
Last Updated: 21 May 2024
In C++, dynamic memory allocation allows us to allocate memory during runtime. Dynamic allocation in an array is particularly useful when the size of an array is not known...
read more
C++ Programs
C++
Picked
cpp-array
C++-new and delete
C++ Array Programs
CPP Examples
How to Compare Arrays in C++?
Last Updated: 09 May 2024
In C++, arrays are linear data structures that can store data of the same type in contiguous memory locations. In this article, we will learn how to compare two arrays to ...
read more
C++ Programs
C++
Picked
cpp-array
CPP Examples
How to Deallocate a 2D Array in C++?
Last Updated: 27 May 2024
In C++, an array of arrays is called a 2D array, or two-dimensional array. Deallocating a 2D array means freeing the allocated memory to prevent any memory leaks, especial...
read more
C++ Programs
C++
Picked
cpp-array
CPP Examples
How to Add an Element at the Beginning of an Array in C++?
Last Updated: 16 May 2024
In C++, arrays are static data structures with a fixed size, hence directly adding new elements at the front or middle is not supported in C++ like any other dynamic data ...
read more
C++ Programs
C++
Picked
cpp-array
C++ Array Programs
CPP Examples
How to Convert Char Array to Int in C++
Last Updated: 28 May 2024
In C++, a character array is treated as a sequence of characters also known as a string. Converting a character array into an integer is a common task that can be performe...
read more
C++ Programs
C++
Picked
cpp-data-types
cpp-array
CPP Examples
misc-cpp
Difference Between Pointers and Array Notations in C++
Last Updated: 05 June 2024
In C++, pointers and array notations are two ways using which we work with arrays and memory for accessing the data. They have distinct behaviours and are used in differen...
read more
C++ Programs
C++
Picked
cpp-array
cpp-pointer
CPP Examples
How to Represent the Deck of Cards Using Array in C++?
Last Updated: 06 June 2024
A deck of cards is a collection of 52 playing cards in which each card is uniquely identified by its suit and rank, there are four suits: heart, diamond, club and spade ea...
read more
C++ Programs
C++
Picked
cpp-array
C++ Array Programs
CPP Examples
Why can't simple initialize (with braces) 2D std::array?
Last Updated: 18 July 2024
C++ provides a fixed-size sequence container named std::array. It is a useful alternative to C-style arrays, providing additional features such as bounds checking and iter...
read more
C++
Picked
STL
cpp-array
Why Use Iterators Instead of Array Indices?
Last Updated: 25 July 2024
In C++, both iterators and array indices are used to access and manipulate elements in a container, such as arrays, vectors, and lists. However, one common question that a...
read more
C++
Picked
cpp-iterator
STL
cpp-array
Is std::vector So Much Slower Than Plain Arrays?
Last Updated: 02 August 2024
In C++, std::vector is a dynamic array provided by the Standard Template Library (STL), and it is commonly compared to plain arrays. A frequent question that arises is: Is...
read more
C++
Picked
STL
cpp-array
cpp-vector
1
2
3
4
...
12
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 !