DEV Community

Discussion on: Can (aᅠ == 1 && a == 2 && ᅠa == 3) equal true?

Collapse
 
isaacleimgruber profile image
IsaacLeimgruber

Does it not work if you set a to True since then 1,2,3 are cast to booleans and are evaluated at True aswell?

Collapse
 
pichardoj profile image
J. Pichardo • Edited

1,2,3 are not casted to booleans as they are primitive types themselves.

Collapse
 
isaacleimgruber profile image
IsaacLeimgruber

In C bool is int is char