Array is the collection of the same data type.
-It is possible to create an array of any type.
Syntax-
type array_name[size];
#include< stdio.h>
int main()
{
int a[100],i;
printf("Enter 5 numbers\n");
//take input in array
for(i=0;i< 5;i++)
{
scanf("%d",&a[i]);
}
printf("Now we have 5 numbers in array,i.e,\n");
for(i=0;i< 5;i++)
{
printf("%d ",a[i]);
}
return 0;
}
Enter 5 numbers
12 18 90 4 56
Now we have 5 numbers in array
i.e,
1218 90 4 56