@chux Yes, the result of the first call to rand after srand appears to be an almost linear function of the seed. On my computer, that is. The results of rand increased by 3 or 4 for each increase of 1 second in the system time, when I used time as the seed.
I changed how the program uses the rand function so it's not a linear function of the seed, and put the improved version in my post.