0
difference between rand() and srand()...????
2 Answers
+ 9
rand() returns a 'random' number. srand() is used to seed the RNG algorithm. Check out how seeding works:
https://code.sololearn.com/cMUCJqFL1X65/?ref=app
+ 1
rand() returns a random number
srand() sets the seed to get the random numbers
See âhttps://en.m.wikipedia.org/wiki/Linear_congruential_generator