How to print the least significant bit (LSB) of a number in C

1 Answer

0 votes
#include <stdio.h>

int main() {
    int n = 3829;
      
    printf("%d", n & 0x1);

    return 0;
}
  

  
/*
run:
  
1      
  
*/

 



answered Jul 17, 2024 by avibootz
...