This preview shows page 1. Sign up to view the full content.
Unformatted text preview: this purpose as :
This statement reserves ten locations in memory for storing elements Here int specifies the type of elements or items that will be stored in the array.
The word marks is the name of array.
 indicates the number of locations or the number of variables of type int in which data elements are to be stored which all should be integer type. It will look like in memory as 0
marks 1 2 3 4 5 6 7 8 9 The Bounds
The lower bound for an array in C language is ‘0’ and upper bound is size1. So marks means marks through marks i.e. 0 to 9 ten locations.
Subscript numbers 0 1 2 3 4 5 6 7 8 9 marks The Subscript
The integer values in brackets are known as subscripts which is used to distinguish one location from the other. The subscript actually specifies the position of element in an array, the last array element will have subscript one less than the size of the array. In this case, size of array is 10 and the last subscript is . Storing/Inputting values in Arrays
Storing/Inputting values in Arrays
View Full Document
- Spring '14