title: How is the rand()/srand() function implemented in C
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3539398/how-does-rand-work-does-it-have-certain-tendencies-is-there-something-better">How does rand() work? Does it have certain tendencies? Is there something better to use?</a>  </p>
  </blockquote>
  
  
  
  <p>I know how to implement it. However, I would like to understand how the rand behaves internally and why is it necessary to initialise a 'seed' value for the rand function.</p>
  
  <p>Alternately put — how does the rand function use the seed value to generate random numbers?</p>