Say I have this function:

int func2() {
    printf("func2\n");
    return 0;
}

Now I declare a pointer:

int (*fp)(double);

This should point to a function that takes a double argument and returns an int.

func2 does NOT have any argument, but still when I write:

fp = func2;
fp(2);

(with 2 being just an arbitrary number), func2` is invoked correctly.

Why is that? Is there no meaning to the number of parameters I declare for a function pointer?

Edit
Report