-
Which of the following is the correct output for the program given below ?
#include <stdio.h>
int main ( )
{
int a = 12, b = 7, c;
c = a != 4 || b == 2;
printf ("c = %d\n" , c);
return 0;
}
-
- c = 0
- c = 1
- c = 4
- c = 2
Correct Option: B
Step 1: c = a != 4 || b == 2;
which is equivalent to c = TRUE || FALSE
or c = TRUE
i.e. c = 1