this post was submitted on 04 Jun 2025
167 points (98.3% liked)

Programmer Humor

36161 readers
336 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] barubary@infosec.exchange 4 points 2 days ago (1 children)

b == 7 is a boolean value

Citation needed. I'm pretty sure it's an int.

[โ€“] simontherockjohnson@lemmy.ml 2 points 2 days ago* (last edited 2 days ago)

Yeah you're actually right, it's an int in C since K&R C didn't have bool, however it's a bool in C++. I forget my standards sometimes, because like I said this doesn't really matter. It's just nerd trivia.

https://en.cppreference.com/w/cpp/types/type_info/operator_cmp.html