Search code examples
cfunction-pointerssizeof

C - How does sizeof() of a function call works?


I have a following line in C:

printf("size of sizeof is %d\n", sizeof(printf("lol!\n")));

Am I getting the size of a function pointer here?


Solution

  • Here, sizeof evaluates the return type of printf. (Here an int)