@AgreeableLandscapeM to Programmer Humor • 3 years agoi++imagemessage-square11arrow-up123arrow-down11
minus-square@AgreeableLandscapeOPMlink1•3 years agoDoes C/C++ do automatic type casting? I feel like an operation on false shouldn’t be a valid input for an integer variable. At least I hope not.
Worth mentioning that this is C (or possibly C++).
could be javascript
or matlab
or julia
Lucky me, I’m not familiar enough with any of these languages.
Does C/C++ do automatic type casting? I feel like an operation on
false
shouldn’t be a valid input for an integer variable. At least I hope not.booleans are implemented as having int values of 0 and 1, so kinda?