Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Sign In
▲
Similar Topics
DSA
22.5k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
C++
4.2k+ articles
C++ Programs
2.4k+ articles
Sorting
1.7k+ articles
Matrix
1.2k+ articles
CPP Examples
700+ articles
cpp-array
160+ articles
C++-new and delete
17 articles
C++ Array Programs
28 posts
Popular Articles
Recent Articles
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: he
...read more
cpp-array
C++
C++ Programs
Picked
C++ Array Programs
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
...read more
cpp-array
C++
C++ Programs
Picked
C++ Array Programs
CPP Examples
How to Create Array of Arrays in C++
Last Updated: 12 May 2024
Arrays are basic C++ data structures that allow users to store the same data type in memory sequentially. To manage more complicated data st
...read more
Arrays
C++
C++ Programs
Picked
C++ Array Programs
CPP Examples
Similar Topics
DSA
22.5k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
C++
4.2k+ articles
C++ Programs
2.4k+ articles
Sorting
1.7k+ articles
Matrix
1.2k+ articles
CPP Examples
700+ articles
cpp-array
160+ articles
C++-new and delete
17+ articles
C++ Program to Find Index of First Occurrence of a Value in Array
Last Updated: 11 March 2024
In C++, an array is a data structure that stores elements of the same type in contiguous memory locations. In this article, we will learn ho
...read more
cpp-array
C++
C++ Programs
Picked
C++ Array Programs
CPP Examples
How to Find the Range of Values in a 2D Array in C++?
Last Updated: 28 February 2024
In C++, 2D arrays are also known as a matrix, and the range of numbers in a 2D array means the maximum and the minimum value in which the nu
...read more
cpp-array
C++
C++ Programs
Picked
C++ Array Programs
CPP Examples
C++ Program to Copy the Contents of One Array Into Another in the Reverse Order
Last Updated: 17 January 2023
Given an array, the task is to copy these array elements into another array in reverse array.Examples:Input: array: 1 2 3 4 5 Output: 5 4 3
...read more
C++
C++ Programs
C++ Array Programs
C++ Program For Finding Subarray With Given Sum - Set 1 (Nonnegative Numbers)
Last Updated: 26 December 2022
Given an unsorted array of non-negative integers, find a continuous subarray that adds to a given number. Examples : Input: arr[] = {1, 4,
...read more
Arrays
C++
C++ Programs
C++ Array Programs
DSA
C++ Program To Find Normal and Trace of a Matrix
Last Updated: 17 January 2023
Given a 2D matrix, the task is to find Trace and Normal of matrix.Normal of a matrix is defined as square root of sum of squares of matrix e
...read more
Arrays
Mathematical
Matrix
C++
C++ Programs
C++ Array Programs
DSA
C++ Program To Check if Two Matrices are Identical
Last Updated: 17 January 2023
The below program checks if two square matrices of size 4*4 are identical or not. For any two matrices to be equal, the number of rows and c
...read more
Arrays
Matrix
C++
C++ Programs
C++ Array Programs
DSA
C++ Program to Efficiently Compute Sums of Diagonals of a Matrix
Last Updated: 17 January 2023
Given a 2D square matrix, find the sum of elements in Principal and Secondary diagonals. For example, consider the following 4 X 4 input mat
...read more
Matrix
C++
C++ Programs
C++ Array Programs
DSA
C++ Program To Interchange Elements of First and Last Columns in Matrix
Last Updated: 17 January 2023
Given a 4 x 4 matrix, the task is to interchange the elements of first and last columns and show the resulting matrix.Examples: Input:8 9
...read more
Arrays
Matrix
C++
C++ Programs
C++ Array Programs
DSA
C++ Program For Boundary Elements of a Matrix
Last Updated: 17 January 2023
Printing Boundary Elements of a Matrix.Given a matrix of size n x m. Print the boundary elements of the matrix. Boundary elements are those
...read more
Arrays
Matrix
C++
C++ Programs
C++ Array Programs
DSA
C++ Program to Remove All Occurrences of an Element in an Array
Last Updated: 08 July 2022
Here we will see how to remove all the occurrences of an element in an array using a C++ program. Below are the examples:Input: {1, 4, 3, 6,
...read more
C++
C++ Programs
Picked
C++ Array Programs
First
1
2
First
1
2
First
1
2
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 !