C++20 sections · 1024 units
Open in CourseQuiz: Return Values
Knowledge check
Check Your Understanding
Which is the cleanest way to return min and max from a function?
- A.Use output parameters: void getMinMax(int& min, int& max)
- B.Return a pair: pair<int, int> getMinMax()
- C.Return an array: int* getMinMax()
- D.Use global variables