Late Sunday night C programming twitter. What is the value of foo? why? uint64_t foo, bar = 10; foo = -bar; would you consider this readable code?
-
-
Replying to @colmmacc
Hmm. Readable no. The expectation would be -10 but since foo is unsigned I *think* it’ll end up being freaking huge. the negative sign would be the first bit but since unsigned it’s gonna consider that bit part of the value. Been years since I did C.
1 reply 0 retweets 1 like
Replying to @TechieDork
flipping the first bit is a very reasonable expectation, probably the least surprising one, and that's definitely not what it does :)
9:35 PM - 9 Jun 2019
0 replies
0 retweets
2 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.