From the C standard, the signal() function has the rather complex signature:

void (*signal(int sig, void (*func)(int)))(int);

The signal() function takes two arguments, an int and a pointer to a function that takes an int argument and returns void; it returns a pointer to a function that takes an int argument and returns void — the same type as its second argument.

This is more complex than your code, but it can be reduced to your example, which is:

So, in context, it means that your statement is a declaration that ptr is a function that takes an int argument and returns a pointer to a function that takes no argument and returns an int value. The implementation (definition) of the function will give an argument name to the inner int.