Does rand() not generate numbers between 0 to 32,767.
source: http://mathbits.com/mathbits/compsci...yFunc/rand.htm
HOwever, when I run the below code, I'm getting huge numbers like:
717154347, 81702301
Code:#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { srand((unsigned) time(NULL)); printf("number is: %d", rand()); return 0; }
example output
http://codepad.org/cwrqFEFf