新手 刚学了指针 球大神指教 下面都是什么意思?
1.int * p[10];2.int (* p)[10];
3.void (* p fun)()
4.( * ( void( * )( ) 0 ) )
#include <stdio.h> #include <stdlib.h> void fun() { printf("fun funcation called\n"); } int main() { void *a = fun; printf("a = %p\n", a); int b = (int) a; printf("b = 0x%x\n", b); void (* c)() = NULL; printf("c = %p\n", c); c = fun; printf("c = %p\n", c); c(); void *d = (void (*)()) b; printf("d = %p\n", d); void (*f)() = *((void (*)()) b); printf("f = %p\n", f); f(); return 0; }
[此贴子已经被作者于2016-12-23 13:32编辑过]