long long

W

w3r3w0lf

hi!

can anyone explain this to me?
long long a;

what is this "long long"?? something like 8 byte variable (two longs) or
what?

thanks
 
J

Jeff Schwab

w3r3w0lf said:
hi!

can anyone explain this to me?
long long a;

what is this "long long"?? something like 8 byte variable (two longs) or
what?

It's usually a sixty-four bit, signed integer type. It's a popular
extension.
 
I

Ivan Vecerina

w3r3w0lf said:
can anyone explain this to me?
long long a;

what is this "long long"?? something like 8 byte variable (two longs) or
what?
- this type has been introduced in the 1999 C standard
- not in the 1998 C++ standard, but expected to be part of the next one.

"long long" is an (at least) 64 bit integer,
just as "long" is at least 32 bits.

From the 99 C standard, 5.2.4.2.1:
minimum value for an object of type long long int

LLONG_MIN -9223372036854775807 // -(263 - 1)

- maximum value for an object of type long long int

LLONG_MAX +9223372036854775807 // 263 - 1

- maximum value for an object of type unsigned long long int

ULLONG_MAX 18446744073709551615 // 264 - 1


hth-Ivan
 
J

John Harrison

Jeff Schwab said:
It's usually a sixty-four bit, signed integer type. It's a popular
extension.

I believe its part of the C99 standard, so no longer a extension in the C
world. But ask in comp.lang.c to confirm.

john
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,160
Messages
2,570,889
Members
47,423
Latest member
henerygril

Latest Threads

Top