3 /* a function pointer to a void pointer which takes one int argument */
4 typedef void (*trigger)(int);
7 /* invokes a list of functions from an array */
8 void invokeTriggers(trigger *list, int n) {
13 //invoke each function
21 printf("f1: %d\n", x);
25 printf("f2: %d\n", x);
37 invokeTriggers(list, 3);