66 909
Assignments Done
99,1%
Successfully Done
In October 2018

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
b)0x54
c)0xAA
d)AA2

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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions