data structure multiple choice questions DSS2
Multiple Choice Questions
Basic programming
Set 2
Q1.A ……… is a variable that stores the address where another object resides
a=Variables
b=Constant
c=Pointer variable
d=Object
Q2. A member function that examines but does not change the state of its object is an ……..
a=Accessor
b=Mutator
c=Constant member function
d= explicit Constructor
Q.3 A member function that changes the state is a ……..
a=Accessor
b=Mutator
c=Constant member function
d= explicit Constructor
Q4.The initialization list is used to initialize the …….. directly
a=Member functions
b=Data members
c=Functions
d=Constants
Q.5 Data members are declared private, thus restricting access to internal details of the class, while methods intended for general use are made public. This is known as …….
a=Data members
b=Encapsulation
c=Information hiding
d=Member Functions
Q.6 log A/B……..
a=log A + log B ;
b=log A − log B
c=XAXB = XA+B
d=None of these
Q7. Suppose you have a group of N numbers and would like to determine the kth largest. This is known as the ……..
a=Delete problem
b=Insert problem
c=Select problem
d=Update problems
Q8. The two most common ways of proving statements in data-structure analysis are proof by …….and proof by ……
a=Implicit& Explicit
b=Induction& Reduction
c=Induction& Contradiction
d=None of these
Q9. A function that is defined in terms of itself is called …….. C++ allows
functions to be recursive
a=Recursive
b=Garbage value
c= function
d=Variable
Q.10 In addition to the return-by-value and return-by-constant-reference idioms, functions
can use return-by………
a= Value
b=Class
c=Object
d=Reference