Input
Output
#include <iostream> using namespace std; int main() { int a[25] = {1,2,3},b[25], size = 3, i,j; cout << "Enter number of elements in array: "; cout << size << endl; cout << "Enter the integers: "; for (i = 0; i < size; i++) { cout << a[i]; } cout << "\nReverse of an array is "; for(i=0,j=size-1;i <size;i++,j--) { b[j] = a[i]; } for(i=0;i<size;i++) { cout << b[i] << " "; } return 0; }