Question

Which of the following will generate an error?
(a) if (answer == 7) {
puts("correct");
}
else {
puts("incorrect");
}
(b) puts(answer == 7 ? "correct" : "incorrect");
(c) printf("%s ", answer == 7 ? "correct" : "incorrect");
(d) answer == 7 ? puts("correct") : puts("incorrect");

Answer

This answer is hidden. It contains 3 characters.