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