I accidentally printed a function name without the parenthesis and it printed a value. I am just curious about how this happens?
Output is same irrespective of the function
This statement printf("\n%u", foo); passes the address of function foo() to printf. So the value that gets printed is the address of this function in the memory of the running program.