gpt4 book ai didi

c - C 结构有大小限制吗?

转载 作者:太空狗 更新时间:2023-10-29 16:38:01 24 4
gpt4 key购买 nike

C 结构有大小限制吗?

最佳答案

来自 C 标准:

5.2.4.1 Translation limits

1 The implementation shall be able to translate and execute at least one program that contains at least one instance of every one of the following limits:

... — 65535 bytes in an object (in a hosted environment only)
... — 1023 members in a single structure or union
... — 63 levels of nested structure or union definitions in a single struct-declaration-list ... 13) Implementations should avoid imposing fixed translation limits whenever possible.

除此之外,上限为 SIZE_MAX(size_t 的最大值)。

关于c - C 结构有大小限制吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7724790/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com