Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  reverse
Language: C/C++
Code:
#include <stdio.h>

int main(void) 
{
     int a[10],b[10],i,j,n;
     printf("enter array size\n");
     scanf("%d",&n);
     printf("enter array elements\n");
     for(i=0;i<n;i++)
     {
         scanf("%d",&a[i]);
     }
     for(i=0;i<n;i++)
     {
         j=n;
         b[j]=a[i];
         j=j-1;
         
     }
     for(j=0;j<n;j++)
     {
      printf("%d\b",b[j]);   
     }
     return 0;
}
Comments: