Quantcast
Viewing all articles
Browse latest Browse all 4922

C/C++ • How long is a long integer on the various types of raspberryPi ?

Code:

long l;long long ll;ll = 0x0;ll = ll-1;printf("%llx\n",ll); l = 0x0;l = l-1;printf("%lx\n",l);
Both printf lines show "ffffffffffffffff" sixteen f's so 64 bits on my raspberry pi 4, whether it was of type 'long integer' or the other.
Is there a way to get 128 or 256 bit extra-long integer types on a raspberry pi and which #includes are needed for those ?

I've been getting a 32 bit result from summing short int, which I thought was a 16 bit unsigned integer. What do you do?

Are there any other oddities to beware of with integer types ?

Statistics: Posted by R61zt — Fri Nov 01, 2024 2:11 pm



Viewing all articles
Browse latest Browse all 4922

Trending Articles