Parameter Passing Exercises

  < Previous  Next >
  1. Write the prototype and declaration for swap() to swap two DNA objects
  2. When would you use the C++11 call-by-rvalue-reference?
  3. Default parameters
    1. Write the definition for a method calculateResults() that takes the following arguments: a string, int, and a float, where the int, and a float are set to -1 and -1.0 by default.
    2. Enumerate all the possible calls to calculateResults() in terms of combinations of argument types.

Last Modified: