Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
dzaima
on Jan 21, 2024
|
parent
|
context
|
favorite
| on:
So you think you know C? (2016)
Smaller-than-'int' types get implicitly promoted to 'int' before arithmetic. Results are indeed very funky.
ryao
on Jan 21, 2024
[–]
That makes sense then. Multiplying two uint16_t can wraparound in an int, while two int16_t or smaller cannot.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: