I was just wondering if the rand (http://www.cplusplus.com/reference/cstdlib/rand/) function will generate the same sequence of random numbers, while using the same seed, when run on different libc implementations, and even different compilers and operating systems (win, linux).
I did some tests using various compilers( g++4.8, g++5.1 and clang) and it seems that the answer is yes, however I did not find any "official" mention of the PRNG algorithm used in the C's random number generation (http://pubs.opengroup.org/onlinepubs/009604599/functions/rand.html), or whether these should be mentioned in the standards ...
If srand() is then called with the same seed value, the sequence of pseudo-random numbers shall be repeated.. C11, §7.22.2.2 has the same wording.randhas a standard implementation.seed, not that different implementation must all produce the same sequence. Moreover if that was the meaning then the standard would have to also provide the exact algorithm to produce the "standard sequence" so that people can write conforming implementations, otherwise the request is unreasonable.