text: Print bitwise AND set of a number N | C # program to print all bitwise subsets of N ( Naive approach ) ; function to find bitwise subsets Naive approach ; Driver function
code: using System ; class GFG { static void printSubsets ( int n ) { for ( int i = 0 ; i <= n ; i ++ ) if ( ( n & i ) == i ) Console . Write ( i + " ▁ " ) ; } public static void Main ( ) { int n = 9 ; printSubsets ( n ) ; } }