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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
everything is associated with an address in memory.
Hi thebeseus,
functions without () are passed as addresses. fun and &fun are the same.
Cheers!
Stefan
functions without () are passed as addresses. fun and &fun are the same.
Cheers!
Stefan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
thebeseus,
your question is answered. Do you need further assistance?
hongjun
your question is answered. Do you need further assistance?
hongjun