How to write a C program to reverse an integer array ?
Solution:/* C programme to print reversely a given integer array */
#include<stdio.h>
int main(void)
{
int x,i,j=0,k;
printf("Please enter array size:\n");
scanf("%d",&x);
int a[x];
int b[x];
for(i=0;i<x;i++)
{
scanf("%d",&a[i]);
}
k=i-1;
for(i=k;i>=0;i--)
{
b[j]=a[i];
j++;
}
for(i=0;i<x;i++)
{
printf("%d ",b[i]);
}
return 0;
}