For example, you're given the interval 5 15 17 90. How to calculate the XOR of it?
Set a variable to zero, and succesively XOR by each element then store back into it.
the operator ^ is xor.
eg a = b^c;
what do you really want? xor by a sequence is going to flop around and generate nonsense ..
1 ^ 2 is 3, which ^ 3 again is zero, which xored with 4 is 4... I see no meaning to this.
Last edited on
OP probably meant "sequence", not "interval".