title: Not printing desired output for sieve of eratosthene
body: <p>I'm trying to create a program which outputs the list of prime numbers given an input value, n.</p>
  
  <p>The SieveEratosthenes function that I made: 
  - generates a list of primes over the first n integers
  - creates storage for the list of generated primes 
  - returns the number of primes generated.</p>
  
  <p>Here's the code in my main function: </p>
  
  <pre><code>int main(){
      int n, i;
      int *primes;
  
      printf("Number that needs to be prime factorized: ");
      scanf("%d", &amp;n);
  
      int num_primes;
  
      num_primes = SieveEratosthenes(n, &amp;primes);
      printf("Generated a list of %d primes\n", num_primes);
      printf("\n");
  
      for (i = 0; i &lt;= sizeof(num_primes) + 1; i++){
          printf("%d", *primes++);
      }
     printf("\n");
  
     return 0;
  }
  </code></pre>
  
  <p>Say n = 20; 
  My output is: </p>
  
  <p>'Generated a list of 8 primes</p>
  
  <p>2 3 5 7 11 13'</p>
  
  <p>When my desired output should be '2 3 5 7 11 13 17 19'</p>
  
  <p>My sieve function is working correctly, but I cannot get to print out the entire list of prime numbers in my main function though.</p>
  
  <p>Any help would be much appreciated. Thanks!</p>