I'm doing an exercise in which I need to print the memory (address) of a pointer. It would be easy to do it with printf("%p", ..) but I'm not allowed to use it.
Do you know how I can get the address without using printf()?
The only function I can use is 'write'.
Here is the statement of my exercise :
Write a function that takes (const void *addr, size_t size), and displays the
memory as in the …