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
Ironically
'a'++
works in C/C++ because'a'
ischar
where in JS ‘a’ isstring
.