由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - unsigned 8bit integer转换成signed 16bit应该是什么结果?
相关主题
一个integer promotion问题真是奇了怪了,VC编译器问题?
怎样将array^转换成string?int 和 unsigned int 比大小会出问题 c++
怎样实现这个线性转换的算法 (转载)一个哈希表问题
来来来,我也问个题 (转载)Check if the sum of two integers in an integer array eqauls to the given number
急问:这个为什么不行?面试题 -算法?
64位长的bitarray如何最快转换成integer?两道M软件大公司的最新面世算法题 (转载)
做机问题请教:stock ticker name 转换成 integer ID (转载)new了指针,delete的时候出错了
一道面试题问一个在C里面转换十六进制的问题
相关话题的讨论汇总
话题: unsigned话题: 16bit话题: 8bit话题: signed话题: integer
进入Programming版参与讨论
1 (共1页)
a****l
发帖数: 8211
1
unsigned int_8 a; //8bit unsigned integer
signed int_16 b; //16bit signed integer
a=0xFF;
b=a;
What's the value of b? The question is, which happens first, unsigned->
signed or 8bit->16bit?
s****n
发帖数: 786
2
This is the rule:
int -> unsigned int -> long -> unsigned long -> long long -> unsigned long
long -> float -> double -> long double

【在 a****l 的大作中提到】
: unsigned int_8 a; //8bit unsigned integer
: signed int_16 b; //16bit signed integer
: a=0xFF;
: b=a;
: What's the value of b? The question is, which happens first, unsigned->
: signed or 8bit->16bit?

a****l
发帖数: 8211
3
I see. Thanks.

【在 s****n 的大作中提到】
: This is the rule:
: int -> unsigned int -> long -> unsigned long -> long long -> unsigned long
: long -> float -> double -> long double

1 (共1页)
进入Programming版参与讨论
相关主题
问一个在C里面转换十六进制的问题急问:这个为什么不行?
[转载] Re: 问个土问题吧64位长的bitarray如何最快转换成integer?
Another question做机问题请教:stock ticker name 转换成 integer ID (转载)
little endian vs big endian一道面试题
一个integer promotion问题真是奇了怪了,VC编译器问题?
怎样将array^转换成string?int 和 unsigned int 比大小会出问题 c++
怎样实现这个线性转换的算法 (转载)一个哈希表问题
来来来,我也问个题 (转载)Check if the sum of two integers in an integer array eqauls to the given number
相关话题的讨论汇总
话题: unsigned话题: 16bit话题: 8bit话题: signed话题: integer