The type specifies the type of the elements that will be contained in the array, such as int float or char and the size indicates the maximum number of elements that can be stored inside the array for ex:type variable-name[50];
float height[50];
type array_name[size]={list of values};The values in the list care separated by commas,
for example the statement int number[3]={0,0,0};Will declare the array size as a array of size 3 and will assign zero to each element if the number of values in the list is less than the number of elements, then only that many elements are initialized. The remaining elements will be set to zero automatically.
#include <stdio.h> #include <stdlib.h> main() { Int a[3],i; printf(" enter array elements”); Scanf(“%d”,&a[i]); For(i=1;i<=3;i++) printf(“output is :%d”,a[i]); }