Here is the code:
#include #include #include int main(void) { int r; int i; for (i = 0; i < 1
If rand() is called before any calls to srand() are made, the same sequence shall be generated as when srand() is first called with a seed value of 1.
Ref:
http://pubs.opengroup.org/onlinepubs/009695399/functions/rand.html