+ 2
What is srand function?
3 Respostas
+ 4
The srand() function sets the starting point for producing a series of pseudo-random integers. If srand() is not called, the rand() seed is set as if srand(1) were called at program start. Any other value for seed sets the generator to a different starting point.
https://www.sololearn.com/learn/CPlusPlus/1638/?ref=app
+ 3
pseudo-random number generator, it seeds the pseudo-random number generator used by the rand() function
http://www.cplusplus.com/reference/cstdlib/srand/
https://www.tutorialspoint.com/cplusplus-program-to-use-rand-and-srand-functions
+ 3
Srand() function is used for generat random numbers, these random number , choose by compiler, that is declared in <time.h> library file. Syntax: srand (time(NULL));