#include #include #include #include int main() { int i =10; /* initialize random seed: */
If your code is running fast enough, srand() might be seeded with the exact same time for each fork. time() only changes every second.
srand()
time()