1RAND(3) Library Functions Manual RAND(3)234
NAME
6rand, srand - random number generator7
SYNOPSIS
9srand(seed)10int seed;1112rand( )13
DESCRIPTION
15Rand uses a multiplicative congruential random number generator with16period 232 to return successive pseudo-random numbers in the range from170 to 215-1.1819The generator is reinitialized by calling srand with 1 as argument. It20can be set to a random starting point by calling srand with whatever21you like as argument.22232425RAND(3)