MIPI_AdvancedC_FRTK/Lect1/14_page_22.c

14 lines
217 B
C
Raw Normal View History

2024-11-14 08:45:50 +03:00
#include <stdio.h>
#include <inttypes.h>
_Bool difSign(int32_t a, int32_t b) {
return (a>>31)^(b>>31);
}
int main(void)
{
int a = -3,b=5;
difSign(a,b) ? printf("YES\n") : printf("NO\n");
return 0;
}