Driver code
int main ( void ) { int A [ ] = { 0 , -1 , 2 , -3 , 1 } ; int x = -2 ; int size = sizeof ( A ) / sizeof ( A [ 0 ] ) ; if ( chkPair ( A , size , x ) ) { cout << " Valid ▁ pair ▁ exists " << endl ; } else { cout << " No ▁ valid ▁ pair ▁ exists ▁ for ▁ " << x << endl ; } return 0 ; }