Initializes the pseudorandom number generator.
Format
#include <math.h>
void srand (unsigned int seed);
Argument
- seed
- An unsigned integer.
Description
This function uses the argument as a seed for a new sequence
of pseudorandom numbers to be returned by subsequent calls to rand.
If rand is called before any calls to srand, the sequence of
pseudorandom numbers is generated as if the seed were set to 1.
Previous Page | Next Page | Table of Contents | Index