Hello @Laplace,
As @cathalmccabe mentioned your are not using the right types in your C code. Have a look at this simple piece of code. It shows the byte size of the different types and how your address is interpreted by the different types.

When you compile it, you can see some warning that the address was truncated for unsigned and unsigned long
Look at the result when you execute it

The above image shows that only unsigned long long and uint64_t types can hold the 64-bit address.
It always a good idea to check the byte size of a type using sizeof() as the number of bytes changes depending on the processor’s architecture. However, (u)int*_t guarantees the byte size independently of the processor’s architecture Integers (The GNU C Library)
Hopefully this helps.
typesTest.c (767 Bytes)
