STANAANDREY

pclab5 10

Oct 26th, 2022
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.17 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.   int x;
  5.   printf("x="); scanf("%d", &x);
  6.   int pos = sizeof(int) * 8 - 1;
  7.   printf("sign bit: %d\n", (x >> pos) & 1);
  8.   return 0;
  9. }
  10.  
Add Comment
Please, Sign In to add comment