Return Multiple Values at a time from Function

How can we return multiple values at a time from function using call by reference?

Showing Answers 1 - 2 of 2 Answers

BALASUBRAMANIAM

  • Jan 7th, 2017
 

Create a struct and set two values inside and return the struct variable. You have to allocate space for the char * in your program. Use pointers as your function parameters. Then use them to return multiple value

  Was this answer useful?  Yes

Assuming I understand your question correctly, see the attached code snippet for an example.

Code
  1. /**

  2.  * Write to the parameters output, another_output, and even_more_output

  3.  */// do something with x, y, and z

  4. }

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions