Question

Which of the following does not display correct if answer is equal to 7 and incorrect if answer is not equal to 7?
a. if (answer == 7) {
cout << "correct";
}
else {
cout << "incorrect";
}
b. cout << answer == 7 ? "correct" : "incorrect";
c. cout << (answer == 7 ? "correct" : "incorrect");
d. answer == 7 ? cout << "correct" : cout << "incorrect";

Answer

This answer is hidden. It contains 46 characters.