Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 400 Bytes

File metadata and controls

15 lines (13 loc) · 400 Bytes

XOR Operation

Practice

int xorOperation(int n, int start) { int a[n],x=0; for(int i=0;i<n;i++) { a[i]=start+2*i; x =x^a[i]; }

    // int xor = a[0];
    //  for(int i=1;i<n;i++)   
    //     xor=xor^a[i];
    return x;
}