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;
}
#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
Post a Comment