Question & Answer: If the line: friend class A: appears in class B, and the line: friend class B: appears in class C. then: A) Class A is a friend of class c. B) Cla…..

35. If the line friend class A; appears in class B, and the line: friend class B; appears in class C. then: A) B) C) D) class A is a friend of class c Class A can access private variable Class c can call class As private member functions. Class s of class B, B can access class As private variables 36. The correct function name for overloading the addition (+) operator 1s: A) operator+ B) operator(+) C) operator:+ D) operator+ 37. Suppose you have a programmer-defined data type Data and want to overload the operator to output your data type to the screen in the form cout <s datatoPrintr cascaded function cal1s. The first 1ine of the function definition would be: and allow A) ostream &operatore<( ostream koutput, const Data &dataToPrint) B) ostream operator<c( ostream koutput, const Data &dataToPrint) C) ostream operator<<( const Data &dataToPrint, ostream koutput ) D) ostream operator<<( const Data &dataToPrint, ostream &output ) 38. Which statement about class unique ptr (ot the new C++ standard) and dynamie memory allocation is false? obect of class unique_ptr maintaine a pointer to dynamically allocated A) An B) unique ptr cannot be used to dynamically allocate memory to an array of object. memorY c) class template uni D) When a unique_ptr goes out of scope, ite destructor automatically returna the 39. Which of the following is most likely a base class of the other three? unique ptr object can be used just as a regular pointer variable is managed memory to the free store A) automobile B) convertible. C) miniVan D) sedan 40. When should base class members be declared protected? A) When all clients should be able to access these members. B) When c) When these members should be available only to derived classes (and friends), these members are used only by member functions of this base class. but not to other clients The protected access specified should never be used. D) Programming section. 41. Convert binary 10011l1 to hexadecimal and decimal. Show your work. Page S

If the line: friend class A: appears in class B, and the line: friend class B: appears in class C. then: A) Class A is a friend of class c. B) Class A can access private variable Class B. C) Class C can call class A’s private member functions. D) Class B can access class A’s private variables. The correct function name for overloading the addition (+) operator is: A) operator + B) operator (+) C) operator: + D) operator _+ Suppose you have a programmer-defined data type Data and want to overload the

Expert Answer

 

Question & Answer: If the line: friend class A: appears in class B, and the line: friend class B: appears in class C. then: A) Class A is a friend of class c. B) Cla..... 1

Still stressed from student homework?
Get quality assistance from academic writers!