121. Program to scan the elements of an array and print it on the screen.
#include<stdio.h>
int
a[5],ele,i;
void
main()
{
ele=sizeof(a)/sizeof(a[0]);
printf("Elements that can be
stored : %d\n",ele);
printf("Enter elements of
array\n");
for(i=0;i<ele;i++)
{
printf("Enter %d element
:",i+1);
scanf("%d",&a[i]);
}
for(i=0;i<ele;i++)
printf("%d ",a[i]);
printf("\n");
}
Comments
Post a Comment