#include <stdlib.h>
void srand(unsigned int seed);
The srand() function uses its argument seed as a seed for a new sequence of pseudo-random numbers to be returned by subsequent calls to rand(). If srand() is not called, the rand() seed is set as if srand(1) was called at program start. Any other value for seed sets the generator to a different starting point. The rand() function generates pseudo-random numbers.
Some people find it convenient to use the return value of the time() function as the argument to srand(), as a way to ensure random sequences of random numbers.
srand() returns no values.