www.delorie.com/djgpp/doc/libc/libc_740.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

srandom

Syntax

 
#include <stdlib.h>

int srandom(int seed);

Description

Initializes the random number generator (see section random). Passing the same seed results in random returning predictable sequences of numbers, unless see section initstate or see section setstate are called.

Return Value

Zero.

Portability

ANSI/ISO C No
POSIX No

Example

 
srandom(45);


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004