title: Returning multiple data items from a function in C or C++
body: <p>I am confused on a couple homework questions I have...
  Can you return multiple data items from a function by using return()?  Can a function only return one value, unless it is a pointer to an array?</p>
  
  <p>I believe that the answer is that a function can return multiple data items by returning a structure.  Then, returning a pointer to an array is not the only way - if that is a way?</p>
  
  <p>But there seems to be a lot of discussion on this topic and so I want to make sure I have at least the basic idea correct:  You can return multiple data items using a structure but using pointer (I don't understand this) will use memory more efficiently. Is this correct?</p>