#include #include int is_negative(int n) { return (n >> 31)&1; } int main() { printf("%d\n", is_negative(10)); printf("%d\n", is_negative(-10)); return 0; }