Program to input an array elements and then display the same array in C-language
#include<stdio.h>
int main()
{
int i,a[10],n;
printf("Enter the size limit maximum is 10\n");
scanf("%d",&n);
printf("Enter the array element\n");
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
printf("Array element are\n");
for(i=0;i<n;i++)
{
printf("%d ",a[i]);
}
}
OUTPUT
Enter the size limit maximum is 10
4
Enter the array element
4
7
8
0
Array element are
4 7 8 0
Comments
Post a Comment