Answer to Question #163980 in C++ for Fariz

Question #163980

Consider the following variables: 

int flags = 0xB2; 

int mask; 

What of the following are the correct statements if bit 6 of flags is to be toggled?

mask=0xBF;

flags = flags ^ mask;mask=0x40;

flags = flags ^ mask;mask=0xBF;

flags = flags | mask;mask=0x40;

flags = flags | mask;


1
Expert's answer
2021-02-15T14:15:13-0500

mask=0xBF;

flags = flags ^ mask;mask=0x40



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog