I wondering if there is a difference between
int (**ppf)(int) and
int (*pf)(int) in C.
C has this wierd way of treating function pointers where a function automatically transforms into a pointer to function. That allows programmers to write really wierd stuff.
double (*pf)(double) = ***&*&***&*sin; (******&*&*puts)("Hello, world!");
This is really strange and I do not see how it is useful.
Here are my question(s) about pointer to pointer to function in C.
int (**ppf)(void) have more levels of indirection than
Is there any case where using
(**ppf)() is superior to
Are there any differences between them at all?
Is even it possible to get a pointer to pointer to function in C?
Yes there is a difference in between
(*pf)(). And pointer to pointer to a function exist in c.
void (*pf)() = f // or &f
void (**ppf)(e) = &pf;
Any one of the following function call can be used to call function
f(); ( &f)(); (*f)(); (**f)(); (***f)();
pf(); (*&pf)(); (*pf)(); (**pf)(); (***pf)();
They're different types. They are even different classes of types; C makes a distinction between object pointers and function pointers. Any function pointer can be assigned to any other function pointer (without a cast), which is not true for object pointers.
pf is a function pointer. But a pointer to a function pointer is a pointer to an object, namely, to the function pointer.