The rand function

Name

rand -- 

Synopsis

#include <stdlib.h>

int rand (void);

Description

The rand function computes a sequence of pseudo-random integers in the range 0 to RAND_MAX.

The implementation shall behave as if no library function calls the rand function.

Returns

The rand function returns a pseudo random integer.

See Also

The srand function

Implementation Notes

The value of RAND_MAX is 0x7fff.