title: Generating random numbers in C
body: <p>I know this question has been asked time and again. I need random numbers between 0-9. I am using the following code:</p>
  
  <pre><code>srand(time());
  int r;
  for (;;)
  {
      while(condition)
      {
          r = rand()%10;
          // ...
          // ...
      }
  }
  </code></pre>
  
  <p>Now I am getting the same sequence of numbers for each iteration of for loop. Can someone provide me the correct code?</p>
  
  <p>PS - My compiler doesn't recognize <code>arcrandom()</code>.</p>