Chapter 6 Arrays
Chapter 6 Arrays
Definition
▪ An array is a group of related data items that share a
common name. For instance, we can define array name
salary to represent a set of salary of a group of
employees.
▪ A particular value is indicated by writing a number called
index number or subscript in brackets after the array
name.
▪ Structures of related data items
▪ Static entity – same size throughout program
▪ Dynamic data structures
▪ Eg: salary[10]
Name of array (Note that
▪ Structure of Array all elements of this array
have the same name, c)
▪ Array elements are like
normal variables
c[ 0 ] = 3; c[0] -45
c[1] 6
printf( "%d", c[ 0 ] );
c[2] 0
2. float table[5][4][5][3];
Contd…