#include void void_callback(void (*p_func)()) { printf("Wrapped function start\n"); (*p_func)(); //callback printf("There I called your shitty function\n"); }; void say_dirp() { printf("DIRP!!!\n"); } int main(void) { void (*ptr)() = &say_dirp; // Ok so this is a weird way to declare pointer to a function but I guess that's what c has. void_callback(ptr); return 0; }