Driver code
int main ( ) { string arr [ ] = { " contribute " , " geeks " , " ide " , " practice " } ; string x = " ide " ; int n = 4 ; int result = binarySearch ( arr , x , n ) ; if ( result == -1 ) cout << ( " Element ▁ not ▁ present " ) ; else cout << ( " Element ▁ found ▁ at ▁ index ▁ " ) << result ; }