delorie.com/djgpp/doc/libc/libc_639.html   search  
libc.a reference

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

random

Syntax

 
#include <stdlib.h>

long random(void);

Description

Returns a random number in the range 0..MAXINT.

Return Value

0 .. MAXINT

Portability

ANSI/ISO C No
POSIX No

Example

 
 /* Produce a random integer between 0 and 199.  */
 int random_number = random () % 200;


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004