title: Can a function return multiple values in C?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3829167/returning-multiple-values-from-a-function">returning multiple values from a function</a>  </p>
  </blockquote>
  
  
  
  <p>For example if you want a function that modifies the values of 3 pointers then you need to declare double pointers as function parameters. If you write many lines with double pointers, the code will be very hard to understand; so is there any way you can return more than one value, for example 3 input variables and 2 output ones?</p>
  
  <pre><code>int * function(int *p,int **q,int **r)
  {
    ...
    return p;
  }
  
  int main(){
    int *p,*q,*r;
  
    ...
  
    p=function(p,&amp;q,&amp;r);
  
    ...
  
    return 0;
  }
  </code></pre>