What does this line mean?
srand (Time (NULL));
Answer 1, Authority 100%
generates a random number using the current date, as a parameter, as if for unpredictable result)
Answer 2, Authority 250%
not quite as it was written. To generate pseudo-random numbers, the
Rand () function is used. It generates numbers based on the base. If the database is not changed, the sequence of pseudo-random numbers will be the same. To set the base of the pseudo-random number generator, the
SRAND () function is used. Its argument is the value of the base. A combination of
Srand (Time (NULL) sets the current time as a base. This technique is often used so that with different launches of the pseudo-random number generator there was every time a different base and, accordingly, different row of obtained values.