title: c - passing pointers to a function
body: <p>I'm trying to change where the pointers min and max are pointer to, but it seems that the  "change" is not sticking outside the function's scope (after the function has run). Before running the function I set *min and *max to point to a "double m = 0".  I'm kind of a NOOB so any advice would be appreciated. </p>
  
  <pre><code>int min_max(double * min , double * max , int size , double a[]){                                                                       
  int i;                                                                                                                                
  
  printf("\n%lg\t%lg\n", *min, *max);                                                                                                   
  
  min = &amp;a[0];                                                                                                                          
  max = &amp;a[0];                                                                                                                          
  
  for (i = 1 ; i &lt; size ; i++) {                                                                                                        
   if (a[i] &gt; *max)                                                                                                                    
    max = &amp;a[i];                                                                                                                      
   else if (a[i] &lt; *min)                                                                                                               
    min = &amp;a[i];                                                                                                                      
   }                                                                                                                                     
   printf("\n%lg\t%lg\n", *min, *max);                                                                                                   
   return 0;                                                                                                                             
  }
  </code></pre>