The syntax to calling a function via a function pointer is no different to calling a function directly, so getting a return value is no different either; comparing a value returned from a function is also the exactly same.
Are you asking how it works? If so, here's a brief explanation:
A function pointer is just a pointer that points to the first instruction of the pointed-to function. When the pointer is invoked, the pointed-to function is given the arguments; the arguments are fully evaluated, and then the function executes. A function-pointer requires that the pointed-to function matches the declaration of the function-pointer exactly.