什么是“Int”和“UINT”/“长”和“ULONG”之间的区别? [英] What is the difference between “int” and “uint” / “long” and “ulong”?

查看:1402
本文介绍了什么是“Int”和“UINT”/“长”和“ULONG”之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道 INT (32位和64位数字),但什么是 UINT ULONG

I know about int and long (32-bit and 64-bit numbers), but what are uint and ulong?

推荐答案

与U是无符号的版本,相同的位大小前缀的基本数据类型。有效地,这意味着它们不能存储负数,但在另一方面,它们可以大如他们的签名的对应的两倍存储正数。该签署的同行不具备U为前缀

The primitive data types prefixed with "u" are unsigned versions with the same bit sizes. Effectively, this means they cannot store negative numbers, but on the other hand they can store positive numbers twice as large as their signed counterparts. The signed counterparts do not have "u" prefixed.

对于int(32位)的限制是:

The limits for int (32 bit) are:

int: –2147483648 to 2147483647 
uint: 0 to 4294967295 

和长期(64位):

long: -9223372036854775808 to 9223372036854775807
ulong: 0 to 18446744073709551615

这篇关于什么是“Int”和“UINT”/“长”和“ULONG”之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆