What are the benefits of arrays ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What are the benefits of arrays ?

C++

19th Nov 2019, 2:52 PM
The unknown 321
The unknown 321 - avatar
2 Answers
+ 7
The unknown 321 Essentially... yes. Another way to think of arrays is as a container that holds a series of values stored in a sequential set of memory addresses. The first memory address is assigned to the array variable. From there, the next value is stored in the adjacent memory address, followed by the next value, and so on and so forth.
19th Nov 2019, 4:08 PM
David Carroll
David Carroll - avatar
+ 2
You mean that instead of creating many individual variables of the same type. You put all these variables in one type of data in a row ?
19th Nov 2019, 3:56 PM
The unknown 321
The unknown 321 - avatar