5. Clear the Bit in an 8-bit Register

Back To All Submissions
Previous Submission
Next Submission

clear bit in  8 bit register 

#include<stdio.h>
int main ()
{  int reg ,pos;
scanf("%d %d",&reg , &pos);
int result=reg&=~(1<<pos);
printf("%d",result);
    return 0;
}

Solving Approach

 

 

 

Was this helpful?
Upvote
Downvote