rand()

This is a discussion on rand() within the Linux Programming forums, part of the Platform Specific Boards category; Are there any good tutorials on usig lrand48() and srand48() or any one that could explain it? I just wrote ...

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    18

    rand()

    Are there any good tutorials on usig lrand48() and srand48() or any one that could explain it? I just wrote a quick program tat gave the value of RAND_MAX.

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    
    main(void)
    {
         printf("RAND_MAX = %d\n, RAND_MAX);
    }
    Now I have to use lrand48() and srand48() and I am lost again. Sorry I am extremely new to linux and C. Thanks!

  2. #2
    Registered User
    Join Date
    Jul 2007
    Posts
    131

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. rand() implementation
    By habert79 in forum C Programming
    Replies: 4
    Last Post: 02-07-2009, 01:18 PM
  2. Wm_timer
    By Ducky in forum Windows Programming
    Replies: 21
    Last Post: 09-26-2008, 06:36 AM
  3. Issue w/ Guess My Number Program
    By mkylman in forum C++ Programming
    Replies: 5
    Last Post: 08-23-2007, 02:31 AM
  4. rand() to choose?
    By wagman in forum C++ Programming
    Replies: 2
    Last Post: 03-27-2002, 01:43 AM
  5. rand () a little confusion
    By Led Zeppelin in forum C Programming
    Replies: 3
    Last Post: 03-19-2002, 10:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21