+ 1

Can anyone explain this code

#include <stdio.h> int func(){ return (printf("hello world")); } int main() { printf("%d\n",sizeof(func)); return 0; }

14th Nov 2019, 11:35 AM
Preity
Preity - avatar
6 ответов
+ 7
Every function has an address so &func will have size 8
14th Nov 2019, 1:35 PM
Saurabh B
Saurabh B - avatar
+ 6
~ swim ~ Also can you tell why &func is giving 8?
14th Nov 2019, 1:22 PM
Avinesh
Avinesh - avatar
+ 6
14th Nov 2019, 1:53 PM
Avinesh
Avinesh - avatar