Check whether bitwise AND of N numbers is Even or Odd | C # implementation of the approach ; Function to check if the bitwise AND of the array elements is even or odd ; If at least an even element is present then the bitwise AND of the array elements will be even ; Driver code
using System ; class GFG { static void checkEvenOdd ( int [ ] arr , int n ) { for ( int i = 0 ; i < n ; i ++ ) { if ( arr [ i ] % 2 == 0 ) { Console . Write ( " Even " ) ; return ; } } Console . Write ( " Odd " ) ; } static public void Main ( ) { int [ ] arr = { 2 , 12 , 20 , 36 , 38 } ; int n = arr . Length ; checkEvenOdd ( arr , n ) ; } }