0
I didn't quite understand the arrays, could explain it to me in a easier way?
3 ответов
+ 3
It´s like a shelf, every index is like a box that can contain objects.
+ 1
its a collection of items with the same objection. for example building tools = [trowel, wire brush, shovel, wheel barrow] or school stuff = [teacher, keytaker, cleaner, nurse, headmaster]
0
The array is a collection of elements. Every elements has its index. The first element (in most languages) starts from index 0. So the 10th element is at index 9. The array can be of any type, but all elements in it must be of the same type. If the array is declared of type integer, the elements must be integers. The string type is actually array of characters. That's why you can get specific characters from it and to replace their places(indexes), or whatever you like. To understand them more, just practice with them. :)