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

Answer - Click Here:
C

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

Answer - Click Here:
A

Q.3 A member function that changes the state is a ……..

a=Accessor

b=Mutator

c=Constant member function

d= explicit Constructor

Answer - Click Here:
B

Q4.The initialization list is used to initialize the ……..  directly

a=Member functions

b=Data members

c=Functions

d=Constants

Answer - Click Here:
B

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

Answer - Click Here:
C

Q.6 log A/B……..

a=log A + log B ;

b=log A − log B  

c=XAXB = XA+B

d=None of these

Answer - Click Here:
B

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

Answer - Click Here:
C

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

Answer - Click Here:
B

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

Answer - Click Here:
A

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

Answer - Click Here:
D