I believe Linux has most of useful functions in library. Your random is
one of them. Take a look at your book and stdlib.h.
I am using random()&01 to get a binary random
number. Turns out if I generate more than 50 numbers,
the last 30 or more are all 1s or 0s, i.e., my random
number generator is not random!
Worse, if I generate 500 numbers, 497 are 1s.
The fraction of consistent numbers increases as the number
of trials increases.
Any clues? Anybody got a pointer to an FAQ where
I can get a random number generator that is random?
Thanks in advance,