(A) System crash
(B) Memory Leakage
(C) Dangling pointer
(D) All of the given
Tag: OOP Mcqs
Which one is not an object association?
(A) Simple association
(B) Inheritance
(C) Aggregation
(D) Association
A normal C++ operator that acts in special ways on newly defined data types is said to be?
(A) glorified
(B) encapsulated
(C) classified
(D) overloaded
Associativity can be changed in operator overloading?
(A) True
(B) False
(C) NA
(D) NA
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();