modernc.org/ccgo/v3@v3.16.14/lib/testdata/tcc-0.9.27/tests/tests2/42_function_pointer.c (about) 1 #include <stdio.h> 2 3 int fred(int p) 4 { 5 printf("yo %d\n", p); 6 return 42; 7 } 8 9 int (*f)(int) = &fred; 10 11 /* To test what this is supposed to test the destination function 12 (fprint here) must not be called directly anywhere in the test. */ 13 int (*fprintfptr)(FILE *, const char *, ...) = &fprintf; 14 15 int main() 16 { 17 fprintfptr(stdout, "%d\n", (*f)(24)); 18 19 return 0; 20 } 21 22 /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/