It is invalid to call sizeof with function( sizeof(func) is an invalid call) although it is not an error you will get warning. And it is likeky to get convert to 1 in C and true(bool) in C++ probably that is why the output is 1
Also note using name of function alone does not always convert/decays to bool. It depends on the context/usage
typedef void (*pFunc) ();
pFunc pf1 = fun; // name of function decays to address of the function not to bool
pf1(); // or (*pf1)(); prints "hello"
void test (bool b)
test (fun); // function name fun decays to bool here and prints "true"