Returns

Assume you have a function that needs to return 3 data items. What would be the best approach to use? Pick the one best answer.
A. Use a return statement to return all three items
B. Use three value parameters to return the three data items
C. Use three reference parameters to return the three data items
D. Use two reference parameters and a return statement to return the three values.
Last edited on
There are situations where D would be a valid choice. For example, a function that returns two things and a status code.
Topic archived. No new replies allowed.