It depends on the OS architecture, not necessarily the PI hardware (as 32-bit OS can run on any Pi).
A 64 bit OS (arm64) will result inand a 32 bit OS (armhf) will showI added a sizeof() to your printf to show that more clearly64-bit OS:32-bit OS:
A 64 bit OS (arm64) will result in
Code:
ffffffffffffffffffffffffffffffff
Code:
ffffffffffffffffffffffff
Code:
#include <stdio.h>int main(){ long l; long long ll; ll = 0x0; ll = ll - 1;; printf("[%d] %llx\n", sizeof(ll), ll); l = 0x0; l = l - 1;; printf("[%d] %lx\n", sizeof(l), l);}
Code:
[8] ffffffffffffffff[8] ffffffffffffffff
Code:
[8] ffffffffffffffff[4] ffffffff
Statistics: Posted by rpdom — Fri Nov 01, 2024 2:35 pm