what is seed in srand()? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what is seed in srand()?

25th Oct 2016, 6:17 PM
prashant
prashant - avatar
2 Answers
+ 2
It initializes the pseudo-random number generator.
25th Oct 2016, 6:24 PM
Zen
Zen - avatar
+ 1
srand(time(NULL)) is usually the most "random" seed you can find
25th Oct 2016, 8:54 PM
Zeke Williams
Zeke Williams - avatar