I need to implement this method.
I have the unsigned * x
, I need to set v
value in the n-th bit, using bitwise operators in C.
void set_bit(unsigned * x,
unsigned n,
unsigned v){
//I need the code here, thanks for your help!
}