what is the advantage of array | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

what is the advantage of array

exam based qn

9th Sep 2016, 5:07 PM
athira kurian
11 Answers
+ 2
It allows you to group data of the same type.
9th Sep 2016, 5:08 PM
Zen
Zen - avatar
+ 1
we can store more than 1 data in same variable
13th Sep 2016, 1:48 PM
Twinkle Baisane
Twinkle Baisane - avatar
+ 1
we can store multiple data in one variable...thats its advantage.there are multiple types or array available, you can use those.
30th Sep 2019, 5:47 AM
Twinkle Baisane
Twinkle Baisane - avatar
0
next advantage
9th Sep 2016, 5:10 PM
athira kurian
0
u cn access any element by their index value...
11th Sep 2016, 5:33 PM
Rishi Thakur
Rishi Thakur - avatar
0
I love arrays, they let you store more data hence management of time
16th Sep 2016, 2:20 PM
Jay Rishi
Jay Rishi - avatar
0
you can group data together, and access either the entire group of data, or individual assets in the group. For example, you have variables indicating player stats, and you just got a chestplate that adds +2 to all stats, you can either add +2 to each individual stat manually, or all of the stats can be put into an array, and a loop can do it.
19th Sep 2016, 7:43 PM
Jonathan Tairov
Jonathan Tairov - avatar
0
Most of the time you can work around arrays, but they're very convenient
19th Sep 2016, 7:43 PM
Jonathan Tairov
Jonathan Tairov - avatar
0
arrays = pointers.. you can also reduce the speed of a pc by increase the required memory
28th Dec 2016, 11:45 PM
dimitris kuriakopoulos
dimitris kuriakopoulos - avatar
0
int a [5] is wrong ,most compilers don't show error but is it wrong the only way you can declare an array is with malloc calloc or sth like this .
14th Jan 2017, 8:49 AM
dimitris kuriakopoulos
dimitris kuriakopoulos - avatar
- 1
they are pointers!!!!!! int a [5] is the same as int *(a + 5) true thing !!!
12th Jan 2017, 5:36 AM
Aaron
Aaron - avatar