/*1. Read Grammar 2. Defines a pointer to a function: double (*p) (Double,char *,int); p = haha; or double (*p) (Double,char *,int) =haha;3. How to call function 1 indirectly. P (19.7, "Jack", 10); 2. (*p) (19.7, "Jack", 10); */#include<stdio.h>intMainintargcChar*argv[])voidTest () {printf ("invoking a function with a pointer \ n"); }{ //(*p) is a fixed notation, which means that the pointer will definitely point to the parametric function than the P//void on the left: pointer variable p points to a function that has no return value//right (): pointer variable p points to a function without formal parameters; void(*Q) (); ///////////////////////////////////////p = test;//pointer variable p points to the test function (*P) ();//calling functions indirectly using pointer variablesTest ();//calling functions directlyP ();//This method =test (), because P=test has return 0;}
Functions that return pointers