I am not quite sure how to formulate this question, but I could not find other similar ones.
Let's say I have this code:
srand(1);
srand(SOME_DEFINED_CONST_INT);
If I run this executable on several different physical machines, is the sequence consistent rand()between them? those. if I get 1, 4, 6, 3, 4on one machine, do I always get the same sequence on others?
If so , how can this be proved? Is it part of the standard?
If not , can I do something to do this?
source
share