Wednesday, 6 August 2014

please help me to find out traverse array of follwing programme

#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();
                       }
                                     

1 comment:

  1. there is just a simple mistake,
    after for loop you have typed ';', thats why you are not getting answer.

    ReplyDelete

Note: only a member of this blog may post a comment.