• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu
+ 1

The srand() function is used to generate truly random number. Can anyone explain this just confuse a lot why this need in rand

c++rand
11th Aug 2017, 1:50 AM
Naresh
Naresh - avatar
2 Answers
+ 6
This code may help you understand why seeding is important in RNG algorithms. https://code.sololearn.com/cMUCJqFL1X65/?ref=app
11th Aug 2017, 2:29 AM
Hatsy Rei
Hatsy Rei - avatar
+ 6
More reference: https://www.sololearn.com/discuss/600365/?ref=app https://www.sololearn.com/discuss/600360/?ref=app https://www.sololearn.com/discuss/122840/?ref=app https://www.sololearn.com/discuss/243654/?ref=app
11th Aug 2017, 2:31 AM
Hatsy Rei
Hatsy Rei - avatar

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
When your heart are gone
1 Votes
I am a beginner here
3 Votes
Where do I find saved code?
1 Votes
Hello everyone, umm i downloaded this app today , and I am a bit confused about this
0 Votes
In data science, which part is easy to learn and which is hard, and why? Which part is most important to data science?
1 Votes
Coding ?
1 Votes
SVG Animation: Container Problems - Any Suggestions?
0 Votes
Pls I need help
0 Votes
Python me variable ka use kya hai
1 Votes
Please suggest a guideline "How do I create a robot map?"
0 Votes