vendredi 28 septembre 2018

Why output is 2 not 3? [duplicate]

This question already has an answer here:

int x, z;
x = 10; z = 1;
if (1<x<5) z=2; else z=3;
printf("%d", z);

What does it mean. What I see - 1<10 true, 10<5 - false. Result must be false. But I get true.

  1<x<5?

Aucun commentaire:

Enregistrer un commentaire