[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
[no subject]
my program to generate random numbers give same set every time i run it. plz
help (i am using linux 6.2 and its random dameon is ON)
#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