Errata on question 2 in chapter 2
In the ERRATA section, there is the following update/comment:
Question 2 states:
You need to make a logical comparison where two values must return true in order for your code to execute the correct statement. Which logical operator enables you to achieve this?
Answer given: "D. &&"
However, both answers "D. &&" and "C. &" are correct.
I disagree with this. The question asks for the logical operator, which is &&. The & is a bitwise operator, not a logical operator, that operates on integers.
It may happen that & will act the same way as && in the question that was asked, but it would be very bad practice in the real world to use & when you are doing logical tests.
So I agree with the book that the correct answer is D, and NOT D and C as stated in the errata comment,.