Reputation: 71
How to generate random numbers with rand() and srand() without time.h in C ?
Upvotes: 0
Views: 2730
Reputation: 2634
You could try givin another seed to the random generator like the program's pid.
srand(getpid());
int num = rand();
Upvotes: 3