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