Check corner case : If there is just one binary string , then print it and return .
if ( n < 2 ) { cout << arr [ n - 1 ] << endl ; return 0 ; } result = arr [ 0 ] ; for ( int i = 1 ; i < n ; i ++ ) { result = andOperationBitwise ( result , arr [ i ] ) ; } cout << result << endl ; }