0
#include<stdio.h>
#include<stdlib.h>
int main()
{
    void first();
    void (*fun) () ;
    fun=first;
    (*fun) ();
    fun();
    return 0;
}
void first()
{
    printf("Hello ");
}

can anyone explain me the above code? what is a function pointer and what is the use of it?

  • In this snippet there is no point. But in general they are used to decide which function should be called in the runtime based on algorithm. – Eugene Sh. Jun 03 '20 at 14:53
  • A function point is the Memory address to find your function. In c you have the possibility to use it a function call. – Denis Kohl Jun 03 '20 at 14:54

0 Answers0