Skip to content

Instantly share code, notes, and snippets.

@jlas
Created April 2, 2014 22:19
Show Gist options
  • Save jlas/9944401 to your computer and use it in GitHub Desktop.
Save jlas/9944401 to your computer and use it in GitHub Desktop.
#include <stdio.h>
void callFunc(int (*funcp)(void)) {
printf("%d", (*funcp)());
}
int func() {
return 1;
}
int main() {
callFunc(&func);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment