Turn off the rightmost set bit Write a C function that unsets the rightmost set bit of an integer.
Read full article from Turn off the rightmost set bit | GeeksforGeeks
int
fun(unsigned
int
n)
{
return
n&(n-1);
}
No comments:
Post a Comment