0212-krtypes.c (323B)
1 int 2 f1(int a) 3 { 4 return a-1; 5 } 6 7 int 8 f2(double a) 9 { 10 return 0; 11 } 12 13 int 14 f3(int (*p)(), int a) 15 { 16 return (*p)(a); 17 } 18 19 int 20 main() 21 { 22 int (*fp1)(); 23 int (*fp2)(int (*)(int), int); 24 25 fp1 = f1; 26 if ((*fp1)(1) != 0) 27 return 1; 28 fp1 = f2; 29 if ((*fp1)(0) != 0) 30 return 2; 31 fp2 = f3; 32 if ((fp2)(f1, 1) != 0) 33 return 3; 34 35 return 0; 36 }