Skip to content

Pointer

Iva edited this page Sep 27, 2024 · 2 revisions

print_pointer

Prints a memory address in hexadecimal format:
Prints a pointer as a hexadecimal string prefixed with 0x.

Original Function:

Library None (Internal helper function)
Signature int print_pointer(void *ptr);
Parameters ptr: The memory address (pointer) to be printed.
Return The total number of characters printed, including the 0x prefix.

Usage Example:

int printed = print_pointer((void *)0xdeadbeef); // Prints "0xdeadbeef"

Specifics:

Prints 0x followed by the hexadecimal representation of the pointer. If the pointer is NULL, prints (nil).

Previous ⬅️ Top ⬆️ Next ➡️

Clone this wiki locally