Please answer and explain why you pick this answer: 1. What will be output by th
ID: 3626416 • Letter: P
Question
Please answer and explain why you pick this answer:1. What will be output by the following code fragment?
string str1 = "That’s a wrap";
cout << str1.find("t") + str1.size();
a. 12 b. 13 c. 15 d. 16 e. 17 f. 18
2. What is the value stored in the variable named y after the following code executes?
Point p = Point(5, 8);
p.move(3, -5);
double y = p.get_y();
a. 5 b. 3 c. 8 d. 2 e. 13 f. -5
3. What is the value of the following expression?
!(10 <= 10)
a. true b. false
4.What is the value of the following expression?
(true && (false || true))
a. true b. false
5. Assuming r, s, t, and u are variables of type int, which of the following expressions is
equivalent to: !((r < s) && (t != u) || (r > u))
a. (r < s) || (t != u) && (r > u) d. !(r < s) || !(t != u) && !(r > u)
b. !(r < s) && !(t != u) || !(r > u) e. (r >= s) && (t == u) || (r <= u)
c. (r > s) || (t == u) && (r < u) f. b) and e)