Sets an initial value of the pseudo-random number sequence generated by the rand function.
void srand (unsigned long seed);
seed Initial value for pseudo-random number sequence generation
The srand function sets up an initial value for pseudo-random number sequence generation of the rand function. If pseudo-random number sequence generation by the rand function is repeated and if the same initial value is set up again by the srand function, the same pseudo-random number sequence is repeated.
If the rand function is called before the srand function, 1 is set as the initial value for the pseudo-random number generation.