作业帮 > 综合 > 作业

short、long在赋值表达式中short=long(类型)说long的部分数据会丢失,是不是说超出范围,取short

来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:综合作业 时间:2024/06/24 17:58:04
short、long
在赋值表达式中
short=long(类型)
说long的部分数据会丢失,
是不是说超出范围,取short的最大值
short、long在赋值表达式中short=long(类型)说long的部分数据会丢失,是不是说超出范围,取short
32位下
short 16位长度
long 32位长度(视编译器而定),
强行转换,long的高位会被舍弃