Say we have a function pointer:
void (*func0)(void);
which is also defined:
void func0(void) { printf( \"0\\n\" ); }
It is undefined behaviour to de-reference a null pointer. The fix is simply to ensure that the pointer refers to an appropriate function.
In your case you want something like this:
void MyFunction(void)
{
printf( "0\n" );
}
and then later you can assign to func0:
func0 = &MyFunction;
Note that I am using a different name for the function pointer variable and the actual function.
And now you can call the function, via the function pointer:
func0();