Skip to main content

How to find give no is 2 power of n?

How to find give no is 2 power of n?

if ( ( no & ( no-1 ) ) == 0 )
printf( “Given number is 2 Power of N\n” );
else
printf( “Given number is not 2 Power of N\n” );

Comments