I heard today that the random function from C is not a good way to generate a random number. Someone told me that it is possible to anticipate the generated value.
I ask because I heard a few interesting things:
- I heard that the number is generated based on the CPU's clock
- If the first one is true, then is it possible to anticipate the random value?
- How does the rand function work and why is it not good?
- Do random functions from other programming languages nested from C/C++ have the same issues?
Basically, if you have the input parameters you will obtain the same result. I also heard something that the rand function from C does not return a random value, but a pseudo-random value. What does this mean?