.TH srand() "" "" "Random-Number Function (libc)"
.PC "Seed random number generator"
.B "#include <stdlib.h>"
\fBvoid srand(\fIseed\^\fB) int \fIseed\^\fB;\fR
.PP
.B srand()
uses
.I seed
to initialize the sequence of pseudo-random numbers returned by
.BR rand() .
Different values of
.I seed
initialize different sequences.
.SH Example
For an example of this function, see the entry for
.BR rand() .
.SH "See Also"
.Xr "libc," libc
.Xr "rand()," rand
.Xr "stdlib.h" stdlib.h
.br
\fIThe Art of Computer Programming, \fRvol. 2
.br
\*(AS, \(sc7.10.2.2
.br
\*(PX Standard, \(sc8.1
.SH Notes
For a superior but non-standard random-number generator, see the function
.BR randl() ,
described in the Lexicon article
.BR libmisc .
.PP
.B srand()
cannot be used with any of the ``rand48'' functions.
For an overview of these functions, see the entry for
.BR srand48() .
