Multiple choice

What will be the output of following program code? #include<stdio.h> main() {int a=10,b=12,c=0; if(!(a>5&&c)) { printf(%d,a!=6&&b>5); printf(%d,a==10||b<15&&c<1); } else printf(If expression is wrong);}

  1. 11

  2. 10

  3. 01

  4. 00

  5. 'If' expression is wrong.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

a=10,b=12,c=0(!(a>5&&c))=>!(10>5 && 0)=>!(1 &&0)=>!0=>1 If condition is true as we get ‘1’ in above expression.a!=6&&b>5=>10!=6 && 12>5 =>1 && 1 =>1a==10||b<15&&c<1 =>10==10 || 12<15 && 0<1 =>1 || 1 && 1=> 1 So option 1 is correct answer.