What is an Array An array is a c ollection of elements with similar data type . Element are identified by an index or a key. Store values in contiguous fashion . EX. 4 6 3 5 8 8 9 Arr 1 2 3 4 5 6 index value
Declaring an Array Syntax dataType arrayName [size] ; Example :
Defining an Array dataType arrayName [ ] = { V, A, L, U, E, S} ;
Accessing Elements Array allows random element access with a integer index. Syntax arrayName [index] = value ;