We talked about arrays before, in an entire chapter. The arrays are collections of fixed number of elements of a given type (strings, integers, etc) where the elements preserve their initial order. Each element can be accessed through its numerical index, which starts at 0.… Read more
Posts Tagged ‘accessing arrays elements’
Arrays
Friday, April 20th, 2018Test your knowledge! – Arrays
Friday, April 7th, 2017Iteration through the elements of an array
Wednesday, April 5th, 2017Iteration through the elements of an array is basically the way we access all the elements of an array, in an automated way. The first type of loop we will exemplify is the For loop.
It is always a good practice to use a for loop whenever you deal with an array or any other structure with indices.… Read more
Accessing the elements of arrays
Tuesday, April 4th, 2017As I was explaining in a previous post, arrays can be seen as a building (the array itself) with apartments (the elements of the array), each identified by an apartment number (the indices or the array elements). So, accessing the elements of arrays is done through their elements indices, just like finding an address is done through the apartment number inside a building.… Read more