void printi(int val);

int function(int val)
{
  return val;
}

int function2(int val)
{
  return val + 10;
}

int function3(int val)
{
  return val + 20;
}

struct callback {
  int (*func1)(int val);
  int (*func2)(int val);
  int (*func3)(int val);
};

struct callback callbacks = {
  function, function2, function3
};

int main()
{
  int val;
  struct callback *p = &callbacks;

  val = p->func1(10);
  printi(val);

  val = p->func2(20);
  printi(val);

  val = p->func3(30);
  printi(val);

  return 0;
}
