PDA

View Full Version : rand()



ke121885
10-04-2009, 08:45 PM
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.



#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!

fronty
10-05-2009, 06:59 AM
man lrand48 (http://www.opengroup.org/onlinepubs/000095399/functions/lrand48.html)