Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Which of the following keyword is used to specify private members? A) public B) private C) protected D) friend 2. Which of the following

image text in transcribed
image text in transcribed
1. Which of the following keyword is used to specify private members? A) public B) private C) protected D) friend 2. Which of the following is the wrong prototype of overloading the subtraction operator? A) Volume operator-(double double): B) double Volume::operator-(double); C) Volume Volume::operator-(volume); D) Volume operator-(Volume, Volume); 3. Which of the following is wrong? A) object is an instance of class B) each object belongs to only one class. c) a class can only have one object; D) the relation between class and object is much like that of data type and variable. 3. A( ) class is a class that has a virtual function. A) const B) public C) abstract D) friend 4. Which is the purpose of destructor? A) it is just a normal member function. B) initialize class C) initialize object D) free the occupied source 5. Given class A, how many times will the constructor be called when statement A array(31 is executed? A) 1 B) 2 C) 3 D) 4 6. Given class Myclass, which of following is to declare its copy constructor? A) Myclass&(Myclass x); B) Myclass(Myclass x); C) Myclass( Myclass & x); D) Myclass(Myclass *x); 7. Which is the wrong description of inheritance? A) the protected members of base class will be protected in derived class. B) the protected members of base class will be protected in public derived class. C) the protected members of base class will be private in private derived class. D) the protected members of base class cannot be accessed by objects of derived class. C)+ 8. Suppose: class A { public: int k; }x1,x2,*p1, *p2; Which of the following is the correct using of member k? A) pl->k=1; B) x2.k=2; c) p1.k=3; D) (*p2).k-4; 9. Which of the following operator cannot be overloaded? A) 11 D) : 10. Which of the following is not the member of a class? A) constructor B) destructor C) copy constructor D) friend function 11. friend operator obj>obj2 will be interpreted as: A) operator>(obj1,obj2) B) > (obji,obj2) C) obj2.operator>(obj1) D) obji.operator>(obj2) 12. In order to make the object of derived class to access the protected members of base class, which is the correct statement? A) it is impossible to accomplish B) using protected inheritance C) using private inheritance D) using public inheritance 13. Which of the following description about linked list is wrong? A) Each node in a linked list has next pointer. B) An empty linked list contains no nodes. C) A linked list should have a head pointer. D) Llinked list is the same as array. 14. Given declaration : class Sample int n; public: void setValue(int no): }; Which is the correct definition of function setvalue defined outside the class? A) Sample::setValue(int n) (n=n0;} B) void Sample::setValue(int n) {n=n0;} c) void.soloint na nan

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

Show that the inductive reactance XL has SI units of ohms.

Answered: 1 week ago

Question

What is conservative approach ?

Answered: 1 week ago

Question

What are the basic financial decisions ?

Answered: 1 week ago

Question

2. Outline the business case for a diverse workforce.

Answered: 1 week ago