return_type (*func_pointer)(parameter_list)
int * p; char * pointer;
typedef return_type (*FunctionPointer) (parameter_list); FunctionPointer func_pointer;
void ( *signal( int sig, void (* handler)( int )))( int );
#include <stdio.h>
int add(int a, int b);
void main()
{
int(*fun1)(int a, int b) = add;
int(*fun2)(int a, int b) = &add;
int(*fun3)(int a, int b) = *add;
printf("%d\n", fun1(1, 2));
printf("%d\n", fun2(1, 2));
printf("%d\n", fun3(1, 2));
char input[10];
gets(input);
}
int add(int a, int b)
{
return a + b;
}
int (*(*pf())())()
{ return nullptr; }
typedef int(*Fun1) ();
typedef Fun1(*Fun2) ();
Fun2 pf()
{
return nullptr;
}
(*(void(*) ())0)();
#include <stdio.h>
typedef int Function(int, int);
typedef int(*FunctionPointer1) (int, int);
typedef FunctionPointer1(*FunctionPointer2) ();
int fun1(int a, int b)
{
return a + b;
}
FunctionPointer1 fun2()
{
return fun1;
}
FunctionPointer2 fun3()
{
return fun2;
}
int(*(*fun4())())(int, int)
{
return fun2;
}
void main()
{
Function* fuction = fun1;
FunctionPointer1 fun = fun1;
int a = fun3()()(3, 4);
int b = fun4()()(5, 6);
printf("%d\n%d\n", a, b);
printf("fun1:%d\n*fun1:%d\n&fun1:%d", fun1, *fun1, &fun1);
printf("fun:%d\n*fun:%d\n&fun:%d", fun, *fun, &fun);
char chars[10];
gets(chars);
}
Function* fuction = fun1;
#include
void hello() { printf("hello"); }
int hello_1()
{
printf("hello 1");
return 0;
}
int main(void) {
(*****hello)();
(****hello_1)();
}
void foo() {
printf("Foo to you too!...\n");
};
int a = 2;
int* test()
{
return &a;
}
int main()
{
int i;
void (*p1_foo)() = foo;
void (*p2_foo)() = *foo;
void (*p3_foo)() = &foo;
void (*p4_foo)() = *&foo;
void (*p5_foo)() = &*foo;
void (*p6_foo)() = **foo;
void (*p7_foo)() = **********************foo;
(*p1_foo)();
(*p2_foo)();
(*p3_foo)();
(*p4_foo)();
(*p5_foo)();
(*p6_foo)();
(*p7_foo)();
i = *(***test)();
printf("i=%d\n",i);
}
&&foo //EROOR &*&*&*&*&*&*foo //OK &******&foo //OK
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有