A) members of the class
B) friends of the class
C) everyone
D) B and C
E) no one
Correct Answer
verified
Short Answer
Correct Answer
verified
Multiple Choice
A) 0
B) 1
C) 2
D) as many as you need
Correct Answer
verified
Short Answer
Correct Answer
verified
View Answer
True/False
Correct Answer
verified
Multiple Choice
A) when an object of the class is passed by value to a function.
B) when an object of the class is initialized by another object of the class
C) when a function returns an object of the class
D) all of the above
Correct Answer
verified
Short Answer
Correct Answer
verified
Short Answer
Correct Answer
verified
View Answer
True/False
Correct Answer
verified
Multiple Choice
A) explicitly from the main program
B) when the class is instantiated
C) when the object of the class goes out of scope
D) Only at the end of main
Correct Answer
verified
Multiple Choice
A) A syntax error occurs, you can not assign one object to another object without the = operator
B) A run-time error occurs, because the C++ system does not know how to do the assignment.
C) The pointers) to the dynamically declared memory in obj2 are copied to the corresponding pointers in obj1.
D) There is a complete and independent copy of all the dynamic memory from obj2 to obj1
Correct Answer
verified
Multiple Choice
A) =
B) ==
C) .
D) []
Correct Answer
verified
Short Answer
Correct Answer
verified
Short Answer
Correct Answer
verified
View Answer
Multiple Choice
A) friend void displayostream& out, const Rational& value)
B) void displayostream& out, const Rational& value)
C) void Rational::displayostream& out, const Rational& value)
D) friend void Rational::displayostream& out, const Rational& value)
Correct Answer
verified
Short Answer
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) void friend operator = myClass& left, const myClass& source) ;
B) void operator = myClass& left, const myClass& source) ;
C) void friend operator = const myClass& source) ;
D) void operator = const myClass& source) ;
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) void friend operator+ const Rational &left, const Rational &right) ;
B) void operatator+ const Rational &left, const Rational &right) ;
C) friend Rational operator+ const Rational &left, const Rational &right) ;
D) Rational operator+ const Rational &left, const Rational &right) ;
Correct Answer
verified
Showing 21 - 40 of 56
Related Exams