Explain three schemes that you could use to have a function “return” two data items to the calling function. Note: you can’t use global variables.
What will be an ideal response?
(1) Use pointers, and explicitly pass the addresses of the two variables to the function using the & operator. Use the indirection operator * to return values to the calling function. (2) Use references, and implicitly pass the
Computer Science & Information Technology
You might also like to view...
Changing the background of all slides in a presentation is best done in the ________
A) slide master B) slide show C) individual slide D) handouts
Computer Science & Information Technology
When you double-click a Word template file, the file will open as a new:
A) template. B) document. C) form. D) content control.
Computer Science & Information Technology