CS 162 Study Guide - Midterm Guide: Virtual Function, Standard Template Library, Universally Unique Identifier

109 views6 pages

Document Summary

Form 2 (put name, form, and section number on scantron!!!) T maxvalue(const t value1, const t value2) if (value1 > value2) return value1; else return value2; A a; int i: both versions are correct, both versions are wrong, version ii is correct, version i is correct. Given the following classes, answer #33 and #34. class b { public: ~b() { cout << b; class a: public b { public: ~a() { cout << a: what is the output of the following code? int main() { A a; return 0: a, aa, ba, b, ab, what is the output of the following code? int main() { B *a=new a; return 0: a, aa, ba, b, ab, suppose circle and rectangle classes are derived from geometricobject and you declared void displaygeometricobject(geometricobject shape) { cout << shape. tostring() << endl; Which statements are executed after statement2 is executed: statement2, statement5, statement1, statement4, statement3, suppose we have the following definition: vector vec;