Question

Which of the following statements correctly prints "Passed" if the student's grade is greater than or equal to 60 and "Failed" if the student's grade is less than 60? [The quotes, of course, should not print.]
a) printf("%s ", grade >= 60 : "Passed" : "Failed");
b) grade >= 60 : puts("Passed ") ? puts("Failed ");
c) printf("%s ", grade >= 60 ? "Passed" : "Failed");
d) grade >= 60 ? puts("Passed ") ? puts("Failed ");

Answer

This answer is hidden. It contains 3 characters.