Go to the first, previous, next, last section, table of contents.


srandom

Syntax

#include <stdlib.h>

int srandom(int seed);

Description

Initializes the random number generator (see section random). Passing the same seed results in random returning predictable sequences of numbers, unless see section initstate or see section setstate are called.

Return Value

Zero.

Portability

not ANSI, not POSIX

Example

srandom(45);


Go to the first, previous, next, last section, table of contents.