Bitwise operators are useful when we want to work with bits. Here, we'll take a look at them.
Given three positive integers a, b and c. Your task is to perform some bitwise operations on them as given below:
1. d = a ^ a
2. e = c ^ b
3. f = a & b
4. g = c | (a ^ a)
5. e = ~e
Note: ^ is for xor. The working of bitwise operators can be found here.
First line of input contains number of testcases. For each testcase, there will be single line containing a, b and c.
For each testcase, output the result of operations preformed in all the above given 5 steps in new line.
1 <= T <= 100
1 <= A, B, C <= 106
4 8 2
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.