Check out example codes for "inverser les éléments d'un tableau manuellement en c++". It will help you in understanding the concepts better.

Code Example 1

#include <iostream>

using namespace std;

int main()  {
  	int array1[5]={1,2,3,4,5};
	int array2[5];

	for(int i=0;i<5;i++)  {
		array2[i]=array1[(5-i)-1];
        cout<<"Number at index"<<i<<"="<<array2[i]<<endl; 
	}
}

Learn ReactJs, React Native from akashmittal.com