#include #include #include #include #include #include #include #include #include #ifdef __cplusplus #include #include #include #include #include #include #include #endif #define COINFLIP() (rand() % 2) bool foo(void) __attribute__((noinline)); bool bar(void) __attribute__((noinline)); int main(int argc, char const *argv[]) { srand(time(NULL)); bool (*table[])(void) = { foo, bar, }; if (table[rand() % 2]()) { printf("random function call returned true\n"); } else { printf("random function call returned false\n"); } return 0; } bool foo(void) { return true; } bool bar(void) { return false; }