Just as a pointer to an object lets you dynamically point at an object of a given type, a pointer to a function lets you dynamically point at a function with a given signature. When applied well, pointers to functions can allow significant runtime flexibility. A Brief Look at State Machines 2. Assume that it is possible to write a function that can return a pointer to itself. Then that function could equally well return a pointer to any function with the same signature as itself.
Many situations come to mind, but one common example is when implementing a state machine.
In brief, a state machine is composed of a set of possible states along with a set of legal transitions between those states. To implement a state machine, one method that is sometimes sufficient is to make each state a function. See your favorite computer science textbook for more information about state machines and their uses. If it is not possible, explain why. Yes, it's possible, but it's not obvious.