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

Popular posts from this blog

CAN INTERVIEW QUESTIONS

Qualifiers and Modifier in C

RTOS Real time operating system interview questions

CAN INTERVIEW QUESTIONS 2

What is UDS protocol

Memory mapping in c

TOP IOT PLATFORMS