Next Previous Contents

## 3.124 rand

> Function

>   Return a pseudo random number.

> Header

>   `stdlib.h`

> Declaration

>   `int rand (void);`

> Description

>   The function returns a pseudo random number between 0 and `RAND_MAX` (exclusive).

> Limits

>   - Without using `srand`, always the same flow of numbers is generated.
>   - On startup, the function behaves as if srand had been used with an argument of 1.
> Availability

>   ISO 9899

> See also

>   _randomize, srand

> Example

>   None.

Next Previous Contents