#include <stdio.h>
#include <stdint.h> // For uintptr_t
int main() {
int x = 42;
int *p = &x;
uintptr_t addr = (uintptr_t)p; // Convert pointer to integer
printf("Address as integer: %lu (hex: 0x%lx)\n", addr, addr);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRpbnQuaD4gIC8vIEZvciB1aW50cHRyX3QKCmludCBtYWluKCkgewogICAgaW50IHggPSA0MjsKICAgIGludCAqcCA9ICZ4OwoKICAgIHVpbnRwdHJfdCBhZGRyID0gKHVpbnRwdHJfdClwOyAgLy8gQ29udmVydCBwb2ludGVyIHRvIGludGVnZXIKICAgIHByaW50ZigiQWRkcmVzcyBhcyBpbnRlZ2VyOiAlbHUgKGhleDogMHglbHgpXG4iLCBhZGRyLCBhZGRyKTsKCiAgICByZXR1cm4gMDsKfQ==