Open attentiveanuj opened 2 years ago
the return statement is wrong it should be return x &((~0<<p+1) | ~(~0<<(p+1-n))) | ((y&~(~0<<n))<<(p+1-n));
the return statement is wrong try x = 16 p = 4 n = 4 y = 8 ans should be 16
the return statement is wrong it should be return x &((~0<<p+1) | ~(~0<<(p+1-n))) | ((y&~(~0<<n))<<(p+1-n));