c语言 long与integer,VB中Integer(整型)和Long(长整型)有什么区别? |
您所在的位置:网站首页 › long和integer区别 › c语言 long与integer,VB中Integer(整型)和Long(长整型)有什么区别? |
VB中Integer(整型)和Long(长整型)区别区别如下: 1、长度不同。 Integer是int的封装类型是 32 位的整数,long 是 64 位的整数,表示范围:-2^63 ~ 2^63 -1 long是长整型。 2、存储的数据长度不一样。 在32位的机器里面, 有符号基本整形 int 能表示的范围是-32768~32767(-2^15~-2^15-1) 无符号基本整形 unsigned int 能表示的范围是0~655350~-2^16-1) 他们之间的区别不大。都是VB常用数据类型。 扩展资料: C语言中的长整型: int 是 C 语言的基本整数类型,可以满足我们处理一般数据的需求。C 语言还提供了四个可以修饰 int 的关键字:short、long、signed,以及 unsigned。利用这四个关键字,C 语言标准定义了以下整数类型: 1、short int(可简写为 short),和 int 一样,也是有符号整数 2、long int(简写:long),有符号整数 3、long long int(简写:long long),C99 标准添加的类型, 有符号整数 4、 unsigned int(简写:unsigned),无符号整数,不能表示负数 5、unsigned long int(简写:unsigned long),无符号整数, 不能表示负数 6、 unsigned short int(简写:unsigned short),无符号整数, 不能表示负数 7、unsigned long long int(简写:unsigned long long), C99 添加的类型,无符号整数 8、所有没有标明 unsigned 的整数类型默认都是有符号整数。 在这些整数类型前面加上 signed 可以使读者更清楚地知道 这些是有符号整数,尽管有没有 signed 都表示有符号整数。 例如:signed int 等同于 int 。 注意,C语言只规定short |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |