write(), printf(), and function references in C -


a few questions 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 happening when use function's name reference?

it shows size of 1 printf still treats pointer , yet void pointer of size 8. additionally, onto write function:

essentially want replicate printf %p writing value of memory address rather value @ address better handle on how works :^)

thanks!


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -