How to Access Array elements [Video]

Array in programs

 

Hey. And welcome to another video about Arrays. In the last video you had an Introduction  to Arrays .

As promised, this  video will continue with the same. Int his part you will learn how Arras are accessed.

In brief

  • Arrays are Zero Based Indices
  • Arrays are accessed using their identifier , which is the name of the array and their index. That is, to access an array you need the name of the array and the index of the element to access. As shown below

theArrayName[index]

eg accessing the third element in an Array called students .

Bear in mind that Arrays are Zero based, so to access the third element:

     students[2]

For  more on this, watch the video above and the previous one on Intro to Arrays.

 

Introduction to programming

If you are interested in learning more things like these. Things that will teach you about programming. Join The introduction to programming using the link /button below. It’s free to join.

Join Intro to programming here for FREE
The following two tabs change content below.
Just a geek who loves Trance . Be yourself everywhere you go. And Be yourself in everything you do. Cheers !

Latest posts by Ricky Wahowa (see all)

Comment Here