Reference: srand
Author: Ellen Siever, Stephen Spainhour & Nathan Patwardhan
Date: 1999-07-02T01:38:19Z

#

| Chapter 5 Function Reference |

## srand

    srand expr

Sets the random number seed for the `rand` operator so that `rand` can produce a different sequence each time you run your program. If expr is omitted, a default seed is used that is a mix of difficult-to-predict, system-dependent values. If you call `rand` and you haven't called `srand` yet, `rand` calls `srand` with the default seed.

Reference: sqrt |  | Reference: stat