Saturday, 27 April 2013

How do I initialize a pointer to a function? | C#.Net Interview Questions

This is the way to initialize a pointer to a function
void fun(int a)
{
}
void main()
{
  void (*fp)(int);
  fp=fun;
  fp(1);
}

No comments: