How to solve this Cpp programming program
Create two arrays and pass them into a function by reference. The function should reverse the first array and place it into the second array (as below).

Arrays when passed into function
Array1: 1, 2, 3, 4, 5
Array2: 0, 0, 0, 0, 0

Arrays when returned from function
Array1: 1, 2, 3, 4, 5
Array2: 5, 4, 3, 2, 1
After completing this, output the arrays.

plz give me solution ... i never undertand this question

for(int i=0; i<SIZE_ARRAY; i++)
array2[i] = array1[SIZE_ARRAY-i];

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.