A few questions about this simple scenario:
#include <unistd.h>
#include <stdio.h>
void empty(){};
int main()
{
printf("%p\t%lu\n", empty, sizeof(empty));
write(1, empty, 100);
return 0;
}
What exactly is happening when I use the function's name as a reference?
It shows size of one but printf still treats it as a pointer and yet a void pointer is of size 8. Additionally, onto the write function:
Essentially I want to replicate the printf %p writing the value of a memory address rather than the value at that address mainly to get a better handle on how this all works :^)
Thanks!