Weird comparison

an anonymous user · May 08, 2025
#include <stdio.h>

void Test(int A);

int main() {
    Test(0);
    Test(5);
    Test(11);
    
    return 0;
}

void Test(int A)
{
    int B = (A < 1) >= (A > 10);
    printf("%d : %d\n", A, B);
}
Output

Comments

Please sign up or log in to contribute to the discussion.