Call
whatsapp
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
Cisco Training in Trivandrum, Trinity Technologies

No.1 Training Institute in Kerala

C++ - QUESTIONS : PART 24

Find the wrong statement/s about Abstract Class.

We can’t create its objects.

 We can’t create pointers to an abstract class. 

It contains at least one pure virtual function.

We can create references to an abstract class.
SHOW ANSWER

We can create objects of the abstract class.

True

 False
SHOW ANSWER

 _______________ is a member function that is declared within a base class and redefined by derived class.

virtual function 

 static function 

friend function

const member function 
SHOW ANSWER

Syntax for Pure Virtual Function is ______________ .

virtual void show()==0 

 void virtual show()==0

virtual void show()=0

void virtual show()=0
SHOW ANSWER

Run time polymorphism can be achieved with______ .

Virtual Base class 

Container class 

 Virtual function 

 Both a and c
SHOW ANSWER

We can create objects of the abstract class.

True

False
SHOW ANSWER

The dereferencing operator ………….. is used to access a member when we use pointers to both the object and the member.

->*

 .*

Any of the above

 None of the above
SHOW ANSWER

In compile time polymorphism, compiler is able to select the appropriate function for a particular call at the compile time itself, which is known as …………

early binding

 static binding

static linking

 All of the above
SHOW ANSWER

……………. binding means that, an object is bound to its function call at compile time.

late

static

 dynamic

fixed
SHOW ANSWER

C++ supports run time polymorphism with the help of virtual functions, which is called …………….. binding.

dynamic

 run time

 early binding

static
SHOW ANSWER

State whether the following statements about pointers in C++ are True.
i) A pointer can be incremented (++) or decremented (–)
ii) Any integer can be added to or subtracted from a pointer
iii) One pointer can be subtracted from another

i and ii only

 ii and iii only

 i and iii only

 All i, ii and iii
SHOW ANSWER

………………. are also known as generic pointers, which refer to variables of any type.

void pointers

 null pointers

 this pointer

base pointer
SHOW ANSWER

The pointers which are not initialized in a program are called ……………..

void pointers

 null pointers

 this pointer

 base pointer
SHOW ANSWER

 …………………… is useful in creating objects at run time.

void pointer

null pointer

 this pointer

object pointer
SHOW ANSWER

A …………………. refers to an object that that currently invokes a member function.

void pointers

 null pointers

 this pointer

base pointer
SHOW ANSWER

The …………………. cannot be directly used to access all the members of the derived class.
 

void pointers

 null pointers

this pointer

base pointer
SHOW ANSWER

Run time polymorphism is achieved only when a ……………….. is accessed through a pointer to the base class.

member function

 virtual function

 static function

real function
SHOW ANSWER

If a ……………………… is defined in the base class, it need not be necessarily redefined in the derived class.

member function

 virtual function

 static function

 real function
SHOW ANSWER
BACK | NEXT
TRINITY SOFTWARE SOLUTIONS,IInd floor, Radheyam Towers, Gandhari Amman Kovil Road, Pulimood, Trivandrum - 1
0471-2334855 | 2335855 | 9447387064 | 9847003556 info@trinitytechnology.in