title: How do I print 4 numbers as a string in C?
body: <p>I've written some code to generate 4 random numbers.</p>
  
  <p>Can anyone help me use the same code but to print them as a string?</p>
  
  <p>Here's the code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;time.h&gt;
  
  
  int main(void)
  {
      int num, i;
      srand(time(NULL));  // Seed ONCE
  
      for(i=0; i&lt;4; ++i) // Loop 4 times for random numbers
      {
          num = rand();
          num = num % 10;
          printf("%d\t", num);
      }
  
      return 0;
  }
  </code></pre>