Traversing of array

*********************************************************************************
//TRAVERSAL OF ARRAY//
#include<stdio.h>
#include<conio.h>
void main()
{
int Arr[20],i,k,U,L,n;
clrscr();
printf(“Enter the total number of elements of array:”);
scanf(“%d”,&n);
printf(“Enter the elements in the array:\n”);
for(i=0;i<n;i++)
{
printf(“Element number [%d] is “,i);
scanf(“%d”,&Arr[i]);
}
L=0;//lower bound
U=n;//upper bound
k=L;
printf(“\n”);
printf(“TRAVERSAL\n”);
while(k<U)
{
printf(“Element number [%d] is %d\n”,k,A[k]);
k=k+1;
getch();
}
Click here for Algorithm
*********************************************************************************

No comments

Leave a Reply

Followers