#include <stdio.h>
int max(int x,int y)
{
return x>y?x:y;
}
int main()
{
int max(int,int);
int (*p)(int,int)=&max;
int a,b,c,d;
printf("Please input three integer \n");
scanf("%d %d %d",&a,&b,&c);
d=(*p)((*p)(a,b),c);
printf("Among %d,%d,%d ,the max integer is %d \n",a,b,c,d);
return 0;
}
/*函数指针,即指向函数的指针
void (*f)();
函数返回指针,即指针函数
void *f();
*/
函数指针的使用
最新推荐文章于 2024-07-10 07:08:21 发布