#include <stdio.h>
typedef void (*FuncPtr)(int);
void f1(int v) {
printf("f1 with %d\n", v);
}
void f2(int v) {
printf("f2 with %d\n", v);
}
FuncPtr FuncPtrArray[2] = {f1, f2};
int main()
{
FuncPtrArray[0](0);
FuncPtrArray[1](0);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CnR5cGVkZWYgdm9pZCAoKkZ1bmNQdHIpKGludCk7Cgp2b2lkIGYxKGludCB2KSB7CiAgICBwcmludGYoImYxIHdpdGggJWRcbiIsIHYpOwp9Cgp2b2lkIGYyKGludCB2KSB7CiAgICBwcmludGYoImYyIHdpdGggJWRcbiIsIHYpOwp9CgpGdW5jUHRyIEZ1bmNQdHJBcnJheVsyXSA9IHtmMSwgZjJ9OwppbnQgbWFpbigpCnsKICAgIEZ1bmNQdHJBcnJheVswXSgwKTsKICAgIEZ1bmNQdHJBcnJheVsxXSgwKTsKICAgIHJldHVybiAwOwp9Cg==