C Exercises: Print the elements of an array in reverse order
17. Print Array in Reverse Using Pointer
Write a program in C to print the elements of an array in reverse order.
Visual Presentation:

Sample Solution:
C Code:
Sample Output:
Pointer : Print the elements of an array in reverse order : ---------------------------------------------------------------- Input the number of elements to store in the array (max 15) : 5 Input 5 number of elements in the array : element - 1 : 2 element - 2 : 3 element - 3 : 4 element - 4 : 5 element - 5 : 6 The elements of array in reverse order are : element - 5 : 6 element - 4 : 5 element - 3 : 4 element - 2 : 3 element - 1 : 2
Flowchart:

For more Practice: Solve these Related Problems:
- Write a C program to print an array in reverse order using pointer decrement without using a loop index.
- Write a C program to display an array in reverse order recursively using pointer arithmetic.
- Write a C program to input an array and then print its elements in reverse order using a for loop with pointers.
- Write a C program to reverse the array in place using pointers and then print the modified array.
C Programming Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous: Write a program in C to compute the sum of all elements in an array using pointers.
Next: Write a program in C to show the usage of pointer to structure.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics