title: C program - srand()
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/322938/recommended-way-to-initialize-srand">Recommended way to initialize srand?</a>  </p>
  </blockquote>
  
  
  
  <p>I have the following problem when using srand() in c.</p>
  
  <p>I call srand(time(NULL)) <strong>in a loop</strong>, but the loop <strong>finishes before 1</strong> sec and every time I call the rand() I get the same value.</p>
  
  <p>How can I solve this?</p>