12345678910111213
void call_rand_func () { switch ( rand() % 4 ) // get a random number { case 0: first_function(); // call a function according to that break; case 1: second_function(); break; // etc. } }