76 951
Assignments Done
Successfully Done
In June 2019

Answer to Question #45131 in C++ for mark

Question #45131
Hi guys, please help me. i dont know how to do these two questions. In need to get it done .Appreciate if you all could help me and explain it to me( if possible)

1)Assuming flags = 0xAA, what is the value of flags after the following statement is executed? cout << (flags << 2);

Answer: a)0xA8

2)Which of the following statements will display "Problem!" if bit 2 of flags is a '0'?

Answer : a)if ((flags & 0x04) == 0x04) cout << "Problem!";
b)if ((flags & 0x04) != 0x04) cout << "Problem!";
c)if ((flags ^ 0x04) == 0x04) cout << "Problem!";
d)if ((flags ^ 0x04) != 0x04) cout << "Problem!";
Expert's answer

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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions