[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
random numbers
my program below generates same set of random numbers every time i run it. i
am using linux 6.2 and its random daemon is ON. plz help
#include<stdio.h>
#include<stdlib.h>
int main(int argc, char *argv[])
{
char ch;
int random;
int i = 0;
srand(1);
while (i < 5 )
{
random = rand();
printf("\nrandom : %d\n",random);
i++;
}
printf("\n\n");
return 0;
}
______
thanks
Deepak
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1