srandom() — Use seed to initialize generator for random()
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4.2 |
both |
Format
#define _XOPEN_SOURCE_EXTENDED 1
#include <stdlib.h>
void srandom(unsigned seed);
General description
The srandom() function initializes the calling thread's current state array for the random() function using the value of seed.
Returned value
srandom() returns no values.