Sunday 10 June 2018

Array of Function pointers


int (*p[4]) (int x, int y);

p[0] = sum; /* address of sum() */
  p[1] = subtract; /* address of subtract() */
  p[2] = mul; /* address of mul() */
  p[3] = div; /* address of div() */

No comments:

Post a Comment