Link to home
Start Free TrialLog in
Avatar of thebeseus
thebeseus

asked on

WHats the output of printf(" %u",function)



printf(" %u",fun);

where fun was a function with the void type and more interestingly the function is written without "()" in the above printf statement.

What will be the output and why?
SOLUTION
Avatar of hongjun
hongjun
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
everything is associated with an address in memory.
Hi thebeseus,
functions without () are passed as addresses. fun and &fun are the same.

Cheers!

Stefan
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thebeseus,
    your question is answered. Do you need further assistance?

hongjun