Question 2 1 pts Given the start of a class declaration class foo public: void x
ID: 3781832 • Letter: Q
Question
Question 2 1 pts Given the start of a class declaration class foo public: void x (foo f: void y (foor const; Which of the two functions can alter the PRIVATE member variables of the foo object (object of type foo) that activates the function Only alter the private member variables of the object that activates the function Only ycan alter the private member variables of the object that activates the function Bothxand y can alter the private member variables of the object that activates the function Neither x nor y can alter the private member variables of the object that activates the function D Question 3 1 pts Is it possible for a member function of adass to activate another member function of the same class? No Yes, but only public member functions Yes, but only private member functions Yes, both public and private member functions can be activated within another member function.
Explanation / Answer
2) a Const won't change, it will be fixed for the whole program
3) b
4) d So you can't have two members have the same name, except that you can overload member functions. Even if you could disambiguate that by some kind of cast, the next problem would already arise at other places.
5) b
6) d
7) c
8) d
9) d
10) d
11) b
12) d
if you like this answer, please give a thumbs up and if you have some doubt just ask in the comment section below. I will try to help. Cheers
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.