Pointer to function
#include <stdio.h>
void display (int , char);
int main()
{ void (*p)(int , char);
int a = 12;
char b= 'R';
p = display;
printf("address of display fuction is %p\n" , p);
(*p)(a, b);
return 0;
}
void display (int a , char b){
printf ("a = %d , b= %c\n" , a, b);
printf("welcome to c programming\n");
}
Comments
Post a Comment