Can you write a function that returns a pointer to itself? If so, why would you want to?
What is a pointer to function? How can it be used?
Assume it is possible to write a function that can return a pointer to itself. That function could equally well return a pointer to any function with the same signature as itself. When might this be useful? Explain.
Is it possible to write a function f() that returns a pointer to itself? It should be usable in the following natural way:
// Example 32-3 // // FuncPtr is a typedef for a pointer to a // function with the same signature as f() // FuncPtr p = f(); // executes f() (*p)(); // executes f()
If it is possible, demonstrate how. If it is not possible, explain why.