How can I generate random numbers in C for multiple processes being run at exactly the same time?
I wanted to use srand and rand but I don't know how (maybe using the process ID?).
You can use a different seed for each process, based on the process id for example :
srand(getpid());
And then just use rand().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With