Arrays :
Declaring an array :
Syntax:-
type arrayname[size];
Example
int a[20];
float b[10];
char name[30];
Arrays are used to store the group of elements of similar types in sequential memory locations. All elements of array are identified by a single name and elements are differentiated using serial number called index. Index of first element is 0 and last element is n-1 if n is representing total number of elements.
Declaring an array :
Syntax:-
type arrayname[size];
Example
int a[20];
float b[10];
char name[30];
Comments
Post a Comment