Skip to content

Instantly share code, notes, and snippets.

@dboyliao
Created December 21, 2015 15:58
Show Gist options
  • Save dboyliao/41d3c99316815a81282e to your computer and use it in GitHub Desktop.
Save dboyliao/41d3c99316815a81282e to your computer and use it in GitHub Desktop.
#include <stdio.h>
typedef int (*myFun)(int x, int y);
void helper(myFun afun){
afun(1, 1);
}
int fun(int x, int y){
printf("%d %d", x, y);
return 0;
}
int main(void){
helper(fun);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment