All submissions

9. Is the Bit Set

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

Solving Approach

 

 

 

Loading...

Input

4 2

Expected Output

1