#include <stdio.h>
// function prototypes
void add(char *name, int x, int y);
// add x + y
void add(char *name, int x, int y) {
printf("%s gives: %d\n", name, x + y);
}
// calling from main
int main() {
// some funky function pointer assignment
void (*add1Ptr)(char*, int, int) = add;
void (*add2Ptr)(char*, int, int) = *add;
void (*add3Ptr)(char*, int, int) = &add;
void (*add4Ptr)(char*, int, int) = **add;
void (*add5Ptr)(char*, int, int) = ***add;
return 0;
}
In the above code , add is the name of the function so if I want to make a pointer to this add function , why does *add ,**add and ***add return the address of the function add, Since the name of the function itself is an address of the function , so when I dereference it repeatedly , how come it is still able to return the address of the function ? Please explain the logic precisely .