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!";
1
Expert's answer
2014-08-25T07:21:59-0400
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-45131.pdf

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
APPROVED BY CLIENTS