Here is the code:
#include #include #include int main(void) { int r; int i; for (i = 0; i < 1
If srand is not called, rand acts as if srand(1) has been called.
http://www.acm.uiuc.edu/webmonkeys/book/c_guide/2.13.html#rand