Ans:->
The program to copy the content of one array into another in the reverse order in C Language
Program is as follows:--
#include<stdio.h>
int main()
{
int a[10], b[10], i, j;
printf("\nEnter 10 Elements : ");
for (i = 0; i<10; i++)
{
scanf("%d", &a[i]);
}
for (i = 0, j = 9; i<10; i++, j--)
{
b[i] = a[j];
}
printf("\nArray after Copying in Reverse Order : ");
for (i = 0; i<10; i++)
{
printf("%d ", b[i]);
}
return 0;
}
OUTPUT:---
Enter 10 elements : 1 2 3 4 5 6 7 8 9 10
Array after coying in Reverse order : 10 9 8 7 6 5 4 3 2 1
THANKU FOR READING THIS ARTICLE ON-
If you want to suggest any changes in the program please feel free to contact us in the comment section or you can reach us using Contact us Page.
0 Comments
If you want to give any suggestion regarding the post please feel free to Comment below-