1 / 5

Introducing Arrays

Introducing Arrays. Defintion. An Array is a chain of elements of the same type. Examples: Days of the week Student marks What other examples can you come up with?. 0. Janie. Bobby. 1. Sally. 2. Joey. 3. Mary. 4. RowA. Example of a 1D Array. Mary is located in RowA[4].

duante
Download Presentation

Introducing Arrays

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introducing Arrays

  2. Defintion • An Array is a chain of elements of the same type. • Examples: • Days of the week • Student marks • What other examples can you come up with?

  3. 0 Janie Bobby 1 Sally 2 Joey 3 Mary 4 RowA Example of a 1D Array Mary is located in RowA[4]

  4. Array examples • Var • myArray : Array[1..20] of Integer; • Questions • What is the name of this array? • How many elements are there? • What is the data type? myArray 20 Integer

  5. Two Dimensional Array: • 2D array stores variables in two dimensions. • A chess board is an example of a 2D array • A matrix is another name for this

More Related