pointer to function syntax and all

  

#include <stdio.h>

// function prototype and defination;


 int *fun(int*p,int c){

    *p=*p+c;

    return p;

}

 int main()

{  

int*(*p)(int*,int );

int a=50; 

int c=40; 

p= fun;


(*p)(&a,c);

printf("%d",a);


    return 0;

}


Comments

Popular posts from this blog

250+ C Programs for Practice

FUNCTION OVERRIDING IN CPP