“long long”是什么样的数据类型?
我不知道这个类型。这是最大的吗?我认为它是整数类型,对吗?或者它是一个浮点的东西?比两倍还大?
I don't know this type. Is that the biggest one from all? I think it is an integer type, right? Or is it a floating point thing? Bigger than double?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据C99标准,
long long
是一个整数类型,位于至少 64 位宽。规定了两种整数 64 位类型:long long int
和unsigned long long int
所以,是的,这是 C 语言标准(C99 版本)规定的最大整数类型)。
C99 还指定了 long double 类型。它是一种扩展精度浮点数值数据类型,在最流行的基于 x86 的平台和 C 语言实现上长度为 80 位。
According to C99 standard,
long long
is an integer type which is at least 64-bit wide. There are two integer 64-bit types specified:long long int
andunsigned long long int
So, yes, this is the biggest integer type specified by C language standard (C99 version).
There is also long double type specified by C99. It's an extended precision floating point numeric data type long for 80-bits on most popular x86-based platforms and implementations of C language.
简而言之,
long long
是一个至少 64 位宽的int
。其基本原理位于此处。基本上,它是对 64 位架构和向后兼容性的响应。标准委员会认为long long
这个名称是所有可能性中最不坏的。The short and simple is that a
long long
is anint
that is at least 64 bits wide. The rationale for this is here. Basically, it is a response to 64 bit architecture and backwards compatibility. And the namelong long
was deemed the least bad of all possibilities by the standards committee.