title: How to print unknown number of outcomes?
body: <p>first time posting and also a beginner of C. My problem is how do I print an unkown number of results? Take this code for example:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(void)
  {
      int a,b,c;
      b=0;
  
      printf("Enter the number of terms: ");
      scanf("%d", &amp;a);
  
      for(b=0; b&lt;=a; ++a)
      {
          printf("\n\nEnter the value of each term: ");
          scanf("%d",&amp;c);
      }
  
  printf("\n\n%d",c);
  
      return(0);
  }
  </code></pre>
  
  <p>I want to print all the values entered in the end but Idk how to adjust it so that it will print 1,2,etc values.</p>
  
  <p>P.S. How can I do this in a while loop as well using fprintf.</p>