rand [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation
HP C/iX Library Reference Manual
rand
Returns a random number.
Syntax
#include <stdlib.h>
int rand (void);
Parameters
None.
Return Values
x A pseudo-random integer in the range 0 to RAND_MAX. The
macro RAND_MAX expands to the value 32767.
Description
If the srand function is not used to initialize the random number
generator to a particular starting point, rand() returns the same
sequence of numbers every time the program is executed.
See Also
rand(), srand(), ANSI C 4.10.2.1, POSIX.1 8.1
MPE/iX 5.0 Documentation