Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help me answer these questions ASAP!!! Question 10 What is the correct prototype of an overload for the helper operator += of a class
Please help me answer these questions ASAP!!!
Question 10 What is the correct prototype of an overload for the helper operator += of a class Foo such that the following code can be compiled? Foo aFoo; aFoo += 12.2; O A. void operator+= (Foo) ; O B. Foo operator+= (Foot ) ; O C. void operator+= (Food, double); O D. void operator+=(double);Question 7 What is a friend helper function for a class Foo ? Choose the answer that de- scribes it best. O A. It's a member function that doesn't have an accessibility label O B. It's a global function that can access private members of type Foo O C. It's a member function that can modify the private data of type Foo O D. It's a global function that can read private private date of Foo but cannot change itQuestion 8 Which of the following prototypes is the correct pre-fix member overload of the decrement operator in class Foo ? A Food operator++(); O B. Foo operator - -(int); O.C. Foo operator+ + (int); O D. Food operator- - ();Question 9 What is the difference between a free helper function and a friend helper func- tion for a class Foo ? O A. The friend helper function is part of the class, while the free helper is not O B. The free helper function is part of the class, while the friend helper is not C. The friend helper function only has access to public members of the class while the free helper can access private members O D. The free helper function only has access to public members of the class, while the friend helper can access private membersStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started