In a Variable we can store only 1 value.
But if we want to store more than 1 value in the same Variable we should Arrays.
Collection of values with similar Datatype is known as Arrays.
(or)
An array is a graph of related data items that store common name. For instance can define an array name"Marks" a set of marks of subscript in brackets after the array name. For example marks[10]. While the compute set of values is refer to as an array the individual values are called elements. Array can be any variable type. The ability to use a single name to represent a collection of items.
Syntax :-
Datatype arrayname [size];
here [] are subscrips.
Ex :-
int a[5];
Every Array values are stored in indexes.
TYPES OF ARRAYS
There are three types of Arrays.
______________________________________________________________________________
________________________________________________
Post a Comment