text: Program to clear K | C program to clear K - th bit of a number N ; Function to clear the kth bit of n ; Driver code
code: #include <stdio.h> NEW_LINE int clearBit ( int n , int k ) { return ( n & ( ~ ( 1 << ( k - 1 ) ) ) ) ; } int main ( ) { int n = 5 , k = 1 ; printf ( " % d STRNEWLINE " , clearBit ( n , k ) ) ; return 0 ; }