reverse
the question is: Write and test the following function: void reverse(int a[],int n); The function reverses the first n elements of the array. For example, the call reverse(a,5) would transform the array {22,33,44,55,66,77,88,99} into {66,55,44,33,22,77,88,99}. my code is: void reverse(int a[],int n); int main() { int a[8]={22,33,44,55,66,77,88,99}; cout<<"The array is: "<<endl; for(int i=0; i<8; i++) { cout<<a[i]<<","; } reverse(a,5); } void reverse(int a[],int n) { for(int i=0; i<n/2; i++) { swap(a[i],a[n-1-i]); } cout<<"\nAfter reverse(a,5):"; for(int i=0; i<n; i++) { cout<<a[i]<<","; } } why the rest not showing?