What will be the output of the following code? int main() {
What will be the output of the following code?
#include <stdio.h>
int main() {
if (5 > 10)
printf("5 is greater than 10");
else
printf("5 is not greater than 10");
return 0;
}
Show answerHide answer
Correct answer: (D) 5 is not greater than 10
Explanation
5 > 10 is false, so the else branch runs and prints "5 is not greater than 10".