AgreeableLandscapeM to Programmer Humor · 4 years agoi++imagemessage-square9fedilinkarrow-up123arrow-down11
arrow-up122arrow-down1imagei++AgreeableLandscapeM to Programmer Humor · 4 years agomessage-square9fedilink
minus-squarenutomicAlinkfedilinkarrow-up4·4 years agoWorth mentioning that this is C (or possibly C++).
minus-squareshilangyu (lemmur)linkfedilinkarrow-up2·edit-24 years agocould be javascript or matlab or julia
minus-squarenutomicAlinkfedilinkarrow-up1·4 years agoLucky me, I’m not familiar enough with any of these languages.
minus-squareAgreeableLandscapeOPMlinkfedilinkarrow-up1·4 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.
minus-squaremaelinkfedilinkarrow-up2·4 years agobooleans are implemented as having int values of 0 and 1, so kinda?
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?