www.delorie.com/djgpp/doc/libc-2.01/libc_521.html   search  
Go to the first, previous, next, last section, table of contents.


rand

Syntax

#include <stdlib.h>

int rand(void);

Description

Returns a pseudo-random number from zero to RAND_MAX.

Return Value

The number.

Example

/* random pause */
for (i=rand(); i; i--);


Go to the first, previous, next, last section, table of contents.

  prev next   webmaster     delorie software   privacy  
  Copyright © 1997     Updated Apr 1997