Skip to content

Instantly share code, notes, and snippets.

@thlgood
Created May 14, 2013 06:06
Show Gist options
  • Save thlgood/5574018 to your computer and use it in GitHub Desktop.
Save thlgood/5574018 to your computer and use it in GitHub Desktop.
/**
*
* main() -> func() -> hello()
*
*/
#include <stdio.h>
void hello(int x)
{
printf("What the F_CK:%d\n", x);
}
void func(int param, void (*func_ptr)(int))
{
func_ptr(param);
}
int main()
{
int param = 10;
func(param, hello);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment