-
Couldn't load subscription status.
- Fork 0
Open
Description
Why do we need int8_t when we are sure that char consumes same size? Or for that matter why do we need stdint.h itself?
Ans - Till now char on C consumes 1B. But what about int? It varies across machines! So, if you definitely need 32b for your data, then pick uint8_t or int32_t instead of C's keyword based types. With this kind of usage, code change is not required across machines. So the purpose of these types is that, portability. And one more noticeable point is that, these words end with t; which simply means type or typedef.
Metadata
Metadata
Assignees
Labels
No labels