0
What's array and examples
C++
3 Answers
+ 2
https://www.w3schools.com/cs/cs_arrays.asp
Here you can find all the necessary info + examples :)
+ 1
Array is.. smth like.. many data collected in one variable. For example:
int i1 = 1;
int i2 = 2;
int i3 = 3;
int i4 = 4;
int i5 = 5;
That's not convenient to declare new variable every time. So we have easier way to do it. Just use array
Example above equals only one string:
int arr[] = {1,2,3,4};
0
An array is a fixed-length container.
Example :
std::array<int, 3> arr{ 1, 2, 3};
Here, arr is an array of 3 integers.