Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Standard integer types #1

@Vishwajith-K

Description

@Vishwajith-K

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions