In the gcc compiler, sizeof(main), sizeof(printf) and sizeof(scanf) all are 1.
I want to know how the size of all these are 1. What is the logic behind it?
In the gcc compiler, sizeof(main) , sizeof(printf) and sizeof(scanf) all are 1. I want
Share
Because the C(99) standard requires (§6.5.3.4/1)
so the return value is meaningless. If you need the
sizeofthe function pointer, usegcc returns 1 on types that the sizeof is meaningless (see c-common.c):