#include<stdio.h>
#include<conio.h>
void main()
{
int
n,i,a[10];
clrscr();
printf(“Enter
the length of array\n”);
scanf(“%d”,&n);
printf(“Enter
the element of array\n”);
for(i=0;i<=n;i++)
{
scanf(“%d”,&a[i]);
}
printf(“Traversing
of the array\n”);
for(i=0;i<=n-1;i++)
printf(“\n%d”,a[i]);
getch();
}
in first for loop it must be
ReplyDeletefor(i=0;i<=n-1;i++)
or it must be for(i=0;i<n;i++)
Deletewhat about to traverse a 3 dimension array
ReplyDelete