2014-01-17 74 views
0

unsigned long long应该是什么确切的typedef
例如:什么应该是无符号long long的确切大小

typedef unsigned int uint32 ; //考虑我的机器读
typedef unsigned char byte ;

那么,什么是

typedef unsigned long long ______ ;

它是uint64或超过这个?

+3

无。它的大小不固定为一个值。它的最小尺寸只有一个要求。 – juanchopanza

+0

在大多数编译器上有8个字节(64位)。 –

+0

'typedef unsigned long long int \t uint64_t' –

回答

0
unsigned long long my_variable; 

装置my_variable是64个比特(或多个)

的无符号整数值可能会发现helpfult这个太:

How many bytes is unsigned long long?

unsigned long long 

是一个synonim

unsigned long long int 

被定义,作为

typedef unsigned long long int uint64_t 

看到

Standard Integer Types

+0

'unsigned long long int'没有被定义为'uint64_t'。 'uint64_t' _may_可以被定义为'unsigned long long int',反过来并不由C指定。 – chux

1

unsigned long long是保证大小至少为64位。因此,它等价于uint_least64_t

的typedef无符号长长uint_least_64_t

+0

在给定当前平台的情况下,它们通常是等价的。一个深奥的/未来的C兼容平台可能具有“无符号长整型”,如128位无符号和无符号长整型,如64位无符号。这样的系统不能用'typedef unsigned long uint_least64_t;'来保持等价。 – chux

相关问题