| www.delorie.com/djgpp/doc/libc/libc_739.html | search |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <stdlib.h> void 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 time (see section time)
or rawclock (see section rawclock).
| ANSI/ISO C | C89; C99 |
| POSIX | 1003.2-1992; 1003.1-2001 |
/* random pause */ srand(time(0)); for (i=rand(); i; i--); |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2004 by DJ Delorie | Updated Apr 2004 |