c program to reverse an array without using another array,c program to reverse an array of numbers,c program to print array in reverse order,c program to reverse the elements of an array,c program to reverse an array using pointers,c program to reverse an array using function,write a program to reverse an array in c,program to reverse an array in java,
C Program display reverse array
#include"stdio.h"
#include"conio.h"
void main()
{
int no[20],temp[20],n,p,i,j;
clrscr();
printf("How many number you want to enter=");
scanf("%d",&n);
for(i=0;i<n;i++)
{
printf("\nEnter %d number=",i+1);
scanf("%d",&no[i]);
}
p=i-1;
printf("\n\nArray in reverse order is=\n");
for(j=0;j<i;j++)
{
temp[j]=no[p--];
printf("\n%d number is=%d",j+1,temp[j]);
}
getch();
}
_____________________________________
#include"stdio.h"
#include"conio.h"
void main()
{
int no[20],i,n;
clrscr();
printf("Enter how many number=");
scanf("%d",&n);
for(i=0;i<n;i++)
{
printf("\n Enter %d number=",i+1);
scanf("%d",&no[i]);
}
printf("\n\nArray display in reverse order=\n\n");
for(n=n-1;n>=0;n--)
{
printf(" %d\n",no[n]);
}
getch();
}
#include"conio.h"
void main()
{
int no[20],temp[20],n,p,i,j;
clrscr();
printf("How many number you want to enter=");
scanf("%d",&n);
for(i=0;i<n;i++)
{
printf("\nEnter %d number=",i+1);
scanf("%d",&no[i]);
}
p=i-1;
printf("\n\nArray in reverse order is=\n");
for(j=0;j<i;j++)
{
temp[j]=no[p--];
printf("\n%d number is=%d",j+1,temp[j]);
}
getch();
}
_____________________________________
#include"stdio.h"
#include"conio.h"
void main()
{
int no[20],i,n;
clrscr();
printf("Enter how many number=");
scanf("%d",&n);
for(i=0;i<n;i++)
{
printf("\n Enter %d number=",i+1);
scanf("%d",&no[i]);
}
printf("\n\nArray display in reverse order=\n\n");
for(n=n-1;n>=0;n--)
{
printf(" %d\n",no[n]);
}
getch();
}