+ 1

Random number in c++

Hey can you guys please explain the use and working of srand((unsigned) time(0)); In generating the random number. https://code.sololearn.com/cXfkOXjxCG6t/?ref=app

29th Oct 2021, 4:03 AM
Mohit
Mohit - avatar
2 Respostas
+ 3
There are quite a number of threads detailing the use of srand, rand and time. Babak's answer in the first thread linked here is especially concise and informative: https://www.sololearn.com/Discuss/742143/ https://www.sololearn.com/Discuss/960641/ https://www.sololearn.com/Discuss/1466867/
29th Oct 2021, 4:08 AM
Fermi
Fermi - avatar
0
Please explain what seed actually means i am not getting it
29th Oct 2021, 12:31 PM
Mohit
Mohit - avatar