Skip to content

Instantly share code, notes, and snippets.

@sutirthaC97
Created April 10, 2017 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sutirthaC97/b9bf7b5e15e714d6d77d627e5a08dcc8 to your computer and use it in GitHub Desktop.
Save sutirthaC97/b9bf7b5e15e714d6d77d627e5a08dcc8 to your computer and use it in GitHub Desktop.
Function pointer example in C.
#include <stdio.h>
void say(char* s){
printf("%s",s);
}
int main()
{
void (*say_ptr)(char* s) = &say;
say("\nHello!");
(*say_ptr)("\nHello!");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment