adplus-dvertising
frame-decoration

Question

What will be output for the following code?
#include <stdio.h>
int main()
{
    int a = 1, b = 2;
    int c = a ^ b & 1;
    printf(""%d
"", c);
}

a.

0

b.

1

c.

2

d.

3

Answer: (b).1

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be output for the following code?