Drivers code
public static void main ( String args [ ] ) { long arr [ ] = { 1 , 2 , 4 , 8 } ; int n = 4 ; int k = 2 , x = 3 ; long ans = maxOR ( arr , n , k , x ) ; System . out . println ( ans ) ; } }