0

What's array and examples

C++

23rd Feb 2021, 2:12 PM
Ahafianyo Christian
Ahafianyo Christian - avatar
3 Respostas
+ 2
https://www.w3schools.com/cs/cs_arrays.asp Here you can find all the necessary info + examples :)
23rd Feb 2021, 2:17 PM
Matthew
Matthew - avatar
+ 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};
23rd Feb 2021, 2:37 PM
Nazeekk
Nazeekk - avatar
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.
23rd Feb 2021, 3:07 PM
Théophile
Théophile - avatar