#include <stdlib.h> int srand(unsigned seed);
Initializes the random number generator for rand()
. If you
pass the same seed, rand()
will return the same sequence of
numbers. You can seed from section time or section rawclock.
ANSI, POSIX
/* random pause */ srand(time(0)); for (i=rand(); i; i--);
Go to the first, previous, next, last section, table of contents.