Which of the following comments would be the best post-condition for this swap function void swap( int& left, int&right);

a. //Postcondition: None
b. //Postcondition: the values of left and right are exchanged.
c. //Postcondition: left has the value of right
d. //Postcondition: left and right are unchanged

b. //Postcondition: the values of left and right are exchanged.

Computer Science & Information Technology

You might also like to view...

Which of the following is a subset of a zone where a zone can contain multiple zone scopes and each zone scope has its own set of resource records?

A. zone scope B. subset scope C. secondary scope D. expanded zone scope

Computer Science & Information Technology

Answer the following questions true (T) or false (F)

1. Downcasting causes the slicing problem. 2. In C++, a virtual destructor is invoked whenever a virtual constructor was used to create the object.

Computer Science & Information Technology