How am I supposed to write the perfect xor code [closed]

  c++, java, python, xor

Write a code in any language (c++,c, python,Java)
Question

To find the XOR of all the possible subarrays possible our of that array.
Input format – The first line takes the input for n denoting the number of inputs in an array
Output – print the result obtained by xoring all the possible subarrays that could be obtained from the array.
EXAMPLE

Sample input
4
1234
Sample output
0

Source: Windows Questions C++

LEAVE A COMMENT