Your Ad Here
0

Which bit wise operator is suitable for checking whether a particular bit is on or off ?

Posted by The Blogger on 9:16 AM in
Answer:

The bitwise AND operator. Here is an example:

enum {
KBit0 = 1,
KBit1,

KBit31,
};

if ( some_int & KBit24 )
printf ( “Bit number 24 is ON\n” );
else
printf ( “Bit number 24 is OFF\n” );


tags: c interview questions and answers, c interview question Which bit wise operator is suitable for checking whether a particular bit is on or off, Which bit wise operator is suitable for checking whether a particular bit is on or off,bitwise operators

0 Comments

Post a Comment

Your Ad Here

Copyright © 2009 Interview Questions and Answers