(A) True
(B) False
(C) NA
(D) NA
Category: Object Oriented Programming Mcqs
Object Oriented Programming OOP Mcqs for Screening tests, Interviews, Viva and Other competitive exams. Object Oriented Programming Mcqs section will help users to prepare mcqs of OOP for various exams. Aspirants of Lecturer Computer Science, SST Computer Science, Subject Specialist Computer Science, Data Entry operator, Computer Programmer, Computer Operator, Software engineer and all other Competitive Exams can prepare their Object Oriented programming portion from here.
When is a constructor called?
(A) Each time the constructor identifier is used in a program statement
(B) During the instantiation of a new object
(C) During the construction of a new class
(D) At the beginning of any program execution
The main function of scope resolution operator (::) is?
(A) To define an object
(B) o define a data member
(C) To link the definition of an identifier to its declaration
(D) To make a class private
Suppose you create an uninitialized vector as follows: vector evec; After adding the statement, evec.push_back(21); what will happen?
(A) The following statement will add an element to the start (the back) of evec and will initialize it with the value 21
(B) The following statement will add an element to the center of evec and will reinitialize it with the value 21
(C) The following statement will delete an element to the end (the back) of evec and will reinitialize it with the value 21
(D) The following statement will add an element to the end (the back) of evec and Qinitialize it with the value 21
Which one of the following functions returns the total number of elements in a vector?
(A) length();
(B) size();
(C) ele();
(D) veclen();
By default the vector data items are initialized to __.
(A) 0
(B) 0.0
(C) 1
(D) null
An abstract class is useful when?
(A) We do not derive any class from it
(B) There are multiple paths from one derived class to another
(C) We do not want to instantiate its object
(D) You want to defer the declaration of the class
The mechanism of selecting function at run time according to the nature of calling object is called?
(A) late binding
(B) static binding
(C) virtual binding
(D) None of the given options