1.

Which of the following is the correct output for the program given below?
#include <stdio.h>
int main ( )
{
int a = 4, b = -1, c = 0, p, q, r, s;
p = a || b || c;
q = a && b && c;
r = a || b && c;
s = a && b || c;
printf ("%d %d %d %d n", p, q, r, s);
return 0;
}

A. 1 1 1 1
B. 1 1 0 1
C. 1 0 0 1
D. 0 1 1 1
E. 1 0 1 1
Answer» F.


Discussion

No Comment Found

Related MCQs