2. Mr. Raju want to read 10 array elements and wants to display them in the reverse way. Write a C program to help Mr. Raju to display the array elements in the reverse way.
#include<stdio.h>
int main(){
printf("Enter the elements of the array:\n");
int arr[10];
int i=0;
for(i=0; i<10; i++){
scanf("%d", &arr[i]);
}
printf("The elements in reverse way is: \n");
int j=0;
for(j=9; j>=0; j--){
printf("%d ", arr[j]);
}
}
Comments
Leave a comment