Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <stdlib.h>
    int rand( void );

Description:
    The rand function computes a sequence of pseudo-random integers in the
    range 0 to  RAND_MAX (32767).  The sequence can be started at different
    values by calling the  srand function.

Returns:
    The  rand function returns a pseudo-random integer.

See Also:
    srand

Example:
    #include <stdio.h>
    #include <stdlib.h>

    void main()
      {
        int i;

        for( i=1; i < 10; ++i ) {
          printf( "%d\n", rand() );
        }
      }

Classification:
    ANSI

Systems:
    All

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson