Multiple choice

What is the output of the given code?

int main()
 {
 int x = 24; int y = 42;
 int z = 37; int a = 22;
 printf("%d",x&y^z|x~a );
 }

  1. 63

    • 63
  2. 74

    • 74
  3. Compiler error

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

This is the correct answer because ~ (tilde) operator is unary operator. So, it can be applied only on a single operand. But here we are using it on two operands (x~a). So, it will generate an error.