C PROGRAM TO INPUT VALUES IN AN ARRAY AND DISPLAY THEM
SOURCE CODE :-
#include<stdio.h>
main()
{
int ar[5],i;
for(i=0; i<5; i++)
{
printf("Enter the value for ar[%d] : ",i);
scanf("%d", &arr[i]);
}
printf("The array elements are : \n");
for(i=0; i<5; i++)
printf("%d\t", arr[i]);
printf("\n");
}
Comments
Post a Comment