Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void my_int_func(int x)
- {
- printf( "%d\n", x );
- }
- int main()
- {
- void (*foo)(int);
- /* the ampersand is actually optional */
- foo = &my_int_func;
- foo (5);
- foo (60);
- foo (70);
- foo (60);
- foo (92);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement