NAME

nrand - returns a random integer within a specific range.

SYNOPSIS

nrand (n)
int n;

DESCRIPTION

nrand returns a random integer within the range 0 to n -1. As nrand depends on the pseudo-random number generator rand(3P) , srand should be called to set the generator to a random starting point before calling nrand for the first time within a program.

SEE ALSO

rand(3P)