C++20 sections · 1024 units
Open in Course

Quiz: Return Values

Knowledge check

Check Your Understanding

Which is the cleanest way to return min and max from a function?

  1. A.Use output parameters: void getMinMax(int& min, int& max)
  2. B.Return a pair: pair<int, int> getMinMax()
  3. C.Return an array: int* getMinMax()
  4. D.Use global variables
Start the roadmap to answer the quizzes and solve the challenges