Answers for "create a program to display the reverse order of the elements of array in c++"

C++
1

c++ program to reverse an array

#include<iostream>
using namespace std;
int main()
{
   int a[]={1,2,3,4,5};  // Using Pointer and Array Relationship
    for (int i = 4; i>=0; i--)
    cout<<*(a+i);
   return 0;
}
Posted by: Guest on May-12-2021

Code answers related to "create a program to display the reverse order of the elements of array in c++"

Browse Popular Code Answers by Language