Computer Science, asked by mnjlrvkmr, 2 months ago

#include <stdio.h>
int main() {
int a = 0;
a = 5 || 2 | 1;
a <<= 4;
a = OxF;
printf("%d", a);
return 0;
}​

Answers

Answered by mschaudhari1989
0

Answer:

4422truth and so much as I have to open the timing of coaching job of coaching staff and I have to open the timing of coaching job of coaching staff and I have to open the timing 566

Answered by bhuvna789456
1

Answer:

  The output is a=1.

Explanation:

    Program:

  #include <stdio.h>

void main(){

   int a=0;

   a=5||2|1;

   printf("%d",a);

}

Explanation:

Bitwise OR operator has precedence over logical OR operator.

 Thus the expression 5 || 2 | 1 is actually 5 || (2 |1)

Now,

2= 0000 0010

1= 0000 0001

2|1= 0000 0011=3 (refer to bitwise operator)

5 || 3 returns true as both are nonzero

Thus a=1

Similar questions