The following code snippet Set 0 to Kth Bit in an variable
#include
int UnsetBitValue(int n, int k);
int main()
{
printf("%d\n\n",UnsetBitValue(255,6));
return 0;
}
// Set kth bit to zero
int UnsetBitValue(int n, int k)
{
n &= ~ (1 << (k - 1));
return n;
}