Write a function in C++ which accepts an integer array and its size as
arguments/parameters and exchanges the values of first half side elements with the
second half side elements of the array. 3
Example:
If an array of eight elements has initial content as
2,4,1,6,7,9,23,10
The function should rearrange the array as
7,9,23,10,2,4,1,6
I wrote a code pls check this....
#include<iostream.h>
#include<conio.h>
void main()
{ clrscr();
int a[10], temp,i=0;
for( i=0;i<10;i++)
{ cout<<" Enter Value for "<<i+1<<" element: ";
cin>>a[i];
}