#include<stdio.h>
#include<conio.h>
main()
{
int a[10],i=0,j;
printf("enter the array size \n");
scanf("%d",&j);
printf("enter the element in array\n");
for(i=0;i<j;i++)
{
scanf("%d",&a[i]);
}
printf("the traverse of array is :\n");
for(i=0;i<j;i++);
{
printf("%d\n",a[i]);
}
getch();
}
#include<conio.h>
main()
{
int a[10],i=0,j;
printf("enter the array size \n");
scanf("%d",&j);
printf("enter the element in array\n");
for(i=0;i<j;i++)
{
scanf("%d",&a[i]);
}
printf("the traverse of array is :\n");
for(i=0;i<j;i++);
{
printf("%d\n",a[i]);
}
getch();
}
there is just a simple mistake,
ReplyDeleteafter for loop you have typed ';', thats why you are not getting answer.