♦ C++ Arrays
♣ About C++ Arrays
Arrays in C++ store multiple elements of particular Data Type.Particular element(s) in an Array can be accessed by providing index key.
♣ Example1: Declaring an Array in C++
Declaring Array in C++ means that we are allocating the memory for the variables.There are various ways of Declaring an Array in C++.
In this example, three empty arrays are declared, namely numbers, fruits and weights.
Example
Input:
Output:
♣ Example2: Initializing an Array in C++
Initializing Array in C++ means that we are assigning values to the variables.There are various ways of Initializing an Array in C++.
In this example, Arrays are initialized with values.
Example
Input:
Output: