#include #include void test1(int a, double b) { printf("%d %lf\n", a, b); } char test2(int a) { return (char) a; } double test3(void) { return 1.0; } int addition(int a, int b) { return a + b; } int multiplication(int a, int b) { return a * b; } void main(void) { printf("%p\n", test1); printf("%p\n", test2); printf("%p\n", test3); printf("\n"); void (*f1)(int, double) = test1; char (*f2)(int) = test2; double (*f3)(void) = test3; f1(2, 3.1); printf("%c\n", f2(109)); printf("%lf\n", f3()); printf("\n"); int (*operation)(int, int); if (rand() % 2 == 0) { operation = addition; } else { operation = multiplication; } printf("%d\n", operation(5, 6)); }