#include <stdio.h>
int func1(int a){
printf("%d\n",a);
}
int(*func2(int a ,int b))(int) {
return func1;
}
int main(){
int (*(*f)(int,int))(int) = func2;
int (*p)(int) = f(0,0);
p(10);
}
输出:10
#include <stdio.h>
typedef int (*func)(int);
int func1(int a){
printf("%d\n",a);
}
func func2(int a,int b) {
return func1;
}
int main(){
func(*f)(int,int)= func2;
func p= f(0,0);
p(10);
}
输出:10