Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Public member of a class is shared between all objects of a class? a. Yes b. No 2. In pass by address, any changes
1. Public member of a class is shared between all objects of a class? a. Yes b. No 2. In pass by address, any changes you make to the formal parameters do not affect (change) the actual arguments? b. No a. Yes 3. Which type of Inheritance leads to diamond problem? a) Single level b) Indirect (Multi-level) c) Multiple d) Hierarchical 4. Diamond problem in Inheritance can be solved using? a) Virtual Inheritance b) Virtual Functions c) Polymorphism d) Multiple Inheritance e) None of above 5. Any change made to a static data member from one member function is? a) reflected to only the corresponding object b) reflected to all the variables in a program c) reflected to all the objects of that class d) constant to that function only 6. If static data members have to be used inside a class, those member functions? a) Must not be static member functions b) Must not be member functions c) Must be static member functions d) Must not be member function of corresponding class 7. Is it possible to access private members in the Friend Function of a class? a. Yes b. No 8. Is it possible to derived a child class from two base classes? b. No a. Yes 9. For overloading iostream operators - what is the objective of making it a friend function? a) To print multiple objects of a class in a single cout statement b) To apply iostream operators on class objects c) To call iostream operators from the object of class d) To call iostream operators without the object of class e) To apply "cin" and "count" on the objects of class class Time { int Hour, Minute, Second; public: Time (); Time (); }; 10. Given the above Time class, select the correct prototype of function for overloading "!=" operator of Time Class? (a) Time & operator!= (Time &t1); (b) char operator != (Time &ti, Time &t2); (c) bool operator!= (Time &t1); (d) bool !=operator (Time &t1); (e) bool operator != (Time &ti, Time &t2); (f) None of above 11. Is it possible to access public members of derived class from the object of base class? a. Yes b. No 12. Which option is correctly explaining the following observation. "Target function for a call is selected at compile time in case of " (a) Static binding (b) Polymorphism (c) Encapsulation (d) Dynamic binding 13. Which of the following is an integral part of an object of class? (a) State (b) Behavior (c) Unique identity (d) All of the given above 14. From the following options, which option is correctly explaining about the object of class? (a) one instance of a class. (b) another word for a class. (c) a class with static methods. (d) a method that accesses class attributes. 15. The copy constructor is called when (a) a function do not returns by value. (b) an argument is passed by value. (c) a function returns by reference. (d) an argument is passed by reference. 16. When a member variable of a class is defined as static then all objects of this class, (a) Have different copies of this variable. (b) Have same copy of this variable. (c) Can not access this variable None of given. 17. Which option is related to polymorphism? (a) Static allocation (b) Static typing (c) Dynamic binding (d) Dynamic allocation 18. Multiple inheritance can be of type (a) Public (b) Private (c) Protected (d) All of the given 19. Which option is correctly explaining the advantage of Inheritance (a) organize data. (b) pass arguments to objects of classes. (c) add features to existing classes without rewriting them. (d) improve data-hiding and encapsulation. 20. How the information hidden within an object can be accessed? (a) Through its interface (b) Through its private data members (c) Through its private member functions (d) Through both public and private members
Step 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