This example demonstrate of Storing Value in Array as well as Retrieving the stored value.
//Write a Program Which Stores Value in Given Number of Array and Print it.
#include<stdio.h>
#include<conio.h>
#define N 5
void main()
{
int num[N],i,j;
clrscr();
printf("Enter Any %d Number\n\n",N);
for(i=0;i<N;i++)
{
printf("Enter Value Of Num[%d] = ",i);
scanf("%d",&num[i]);
}
printf("\n");
for(j=0;j<N;j++)
{
printf("Value Of Num[%d] is %d\n",j,num[j]);
}
getch();
}
Ask Question