Multiple choice technology programming languages

How many values can be returned by a C++ function?

  1. 1

  2. 0

  3. infinity

  4. 2

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

C++ functions can return only one value directly through the return statement. Multiple values can be returned indirectly using pointers, references, or by wrapping them in a struct/class.