Question issue , , , ,, ,, , , , , , , , , , ,, , , , , , , ,


The question is we have to find xor of given range and this is my code it’s giving only zero in output can you check this is it correct or not.
an exp. for this
Input:
1
10 3
4 7 8 5 9 6 1 0 20 10
3 8
1 6
2 3
Output:
29
31
17

Explanation:

For the first query: The resulting array is: (4 ,7 ,20, 10)
Their Xor will be: 29
For the Second query: The resulting array is: (1, 0, 20, 10)
Their Xor will be: 31
For the Third query: The resulting array is: (4, 5, 9, 6, 1,0 ,20, 10)
Their Xor will be: 17