Initializes the pseudorandom-number generator rand. Format #include <stdlib.h> void srand (unsigned int seed);
1 – Argument
seed An unsigned integer.
2 – Description
The srand function uses the argument as a seed for a new sequence of pseudorandom numbers to be returned by subsequent calls to rand. If srand is then called with the same seed value, the sequence of pseudorandom numbers is repeated. If rand is called before any calls to srand, the same sequence of pseudorandom numbers is generated as when srand is first called with a seed value of 1.