0

What should be the exact typedef for unsigned long long ?
For example:

typedef unsigned int uint32 ; //considering my machine reading
typedef unsigned char byte ;

So what is

typedef unsigned long long ______ ;

Is it uint64 or more than this?

Johan Bezem
  • 2,582
  • 1
  • 20
  • 47
Ashwin
  • 411
  • 1
  • 10
  • 28

2 Answers2

1

unsigned long long is guaranteed to be at least 64 bits in size. Thus, it is equivalent to uint_least64_t:

typedef unsigned long long uint_least_64_t

Filipe Gonçalves
  • 20,783
  • 6
  • 53
  • 70
  • Given current platforms, they are typically equivalent. An esoteric/future C compliant platform may have `unsigned long long` as 128-bit unsigned and `unsigned long` as a 64-bit unsigned. Such a system would not maintain that equivalent with `typedef unsigned long uint_least64_t;`. – chux - Reinstate Monica Jan 17 '14 at 17:17
0
unsigned long long my_variable;

means my_variable is an unsigned integer value of 64 bits (or more)

you may find helpfult this too:

How many bytes is unsigned long long?

unsigned long long

is a synonim of

unsigned long long int

that is defined as

typedef unsigned long long int uint64_t

see

Standard Integer Types

Community
  • 1
  • 1
Paolo
  • 15,233
  • 27
  • 70
  • 91