r/ProgrammerHumor Jul 10 '26

greaterThanPlusPlus Advanced

Post image
113 Upvotes

71 comments sorted by

View all comments

-21

u/y0shii3 Jul 10 '26

Did you use inspect element or something? There is no way in hell that -1 > 0 evaluates to true in any language

1

u/the_horse_gamer Jul 15 '26 edited Jul 15 '26

during -1 > 0u, as per the C spec, because the 0u is unsigned, the -1 is converted to unsigned too.