Random experiments in C