gpt4 book ai didi

c - 如何预测 C 中特定数据类型的大小?

转载 作者:太空宇宙 更新时间:2023-11-04 05:31:09 24 4
gpt4 key购买 nike

我知道 C 中数据类型的大小并不是对所有架构师都是固定的。

但是对于固定的 CPU 架构师,我如何预测 sizeof(unsigned short) 的大小?

预测 我的意思是不是测试(printf("%d",sizeof(unsigned short));)

最佳答案

阅读编译器文档。

关于c - 如何预测 C 中特定数据类型的大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5415298/

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