Given a literal memory address in hexadecimal format, how can I create a pointer in C that addresses this memory location?
Memory addresses on my platform (IBM iSeries) are 128bits. C type long long
is also 128bits.
Imagine I have a memory address to a string (char array) that is: C622D0129B0129F0
I assume the correct C syntax to directly address this memory location:
const char* const p = (const char* const)0xC622D0129B0129F0ULL
I use ULL
suffix indicate unsigned long long literal.
Whether my kernel/platform/operating system will allow me to do this is a different question. I first want to know if my syntax is correct.