1RAND(3C) RAND(3C)
2
3
4
6 rand, srand - random number generator
7
9 srand(seed)
10 int seed;
11
12 rand()
13
15 The newer random(3) should be used in new applications; rand remains
16 for compatibilty.
17
18 Rand uses a multiplicative congruential random number generator with
19 period 2**32 to return successive pseudo-random numbers in the range
20 from 0 to (2**31)−1 on the VAX, and (2**15)−1 on the PDP-11.
21
22 The generator is reinitialized by calling srand with 1 as argument. It
23 can be set to a random starting point by calling srand with whatever
24 you like as argument.
25
27 random(3)
28
29
30
317th Edition September 29, 1985 RAND(3C)