array symmetric
bool isSymmetric(int a[], int n); void showarray( int a[],int n); int main() { int a[]= {22,33,44,55,44,33,22}; int array_size=7; cout<<"The array is: "<<endl; showarray(a,array_size); int n; cout<<"\nEnter n you want to reverse: "; cin>>n; isSymmetric(a,n); cout<<"\nThe array is after reverse: "<<endl; showarray(a,n); } void showarray( int a[],int n) { for(int i=0; i<n; i++) { cout<<a[i]<<","; } } bool isSymmetric(int a[], int n) { for(int i=0; i<n/2; i++) { if(a[i]!= a[n-1-i]) { return false; } else { return true; } } } Write and test the following function: bool isSymmetric(int a[],int n); The function returns true if and only if the array obtained by reversing the first n elements is the same as the original array. For example, if a is {22,33,44,55,44,33,22} then the call isSymmetric(a,7) would return true, but the call isSymmetric(a,4) would return false. Warning: The function should leave the array unchanged. Is it correct according to the question?