Computer Science, asked by saikrishna270143, 1 year ago

1. main()
int a=6, b=10, x;
x=a&b;
printf("%d", x);
The value of x is
(1) 2
2) 10
(3) 5
(4)
7​

Answers

Answered by charlie1505
4

Answer:

output value of x is 2

option 1) is the right answer

Answered by ExieFansler
15

Answer:

(1) 2.

Explanation:

We have three integers a,b and x.Where the value of a is 6 and the value value of b is 10.

x=a&b means the bitwise and operation of a and b will be stored in x.

First a and b will be converted to their respective binary numbers and their logical and will be done.

binary of 6 is 0110 and binary of 10 is 1010.Logical and of these two numbers will give 0010 whose value is 2.

Hence 2 will be printed on the screen.

Similar questions