Data Structures through C++ Mid - I, September - 2011
1.The standard c comment
-
/ /
-
//
-
/* and */
-
None of these
-
Answer: B
2.The operator >> is called
-
an extraction operator
-
a get from operator
-
either a or b
-
get to operator
-
Answer: C
3.When a language has the capability to produce new data type, it is called
-
Extensible
-
Overloaded
-
Encapsulated
-
Reprehensible
-
Answer: A
4.What is a reference?
-
an operator
-
a reference is an alias for an object
-
used to rename an object
-
None of these
-
Answer: B
5.A constructor is called whenever
-
a object is declared
-
an object is used
-
a class is declared
-
a class is used
-
Answer: A
6.State the object oriented languages
-
C++
-
Java
-
Eiffel
-
All of the above
-
Answer: D
7.Overload function in C
-
a group function with the same name
-
all have the same number and type of arguments
-
functions with same name and same number and type of arguments
-
All of the above
-
Answer: A
8.Operator overloading is
-
making c++ operators works with objects
-
giving new meaning to existing c++ operators
-
making new c++ operator
-
both a& b above
-
Answer: D
9.The following keyword will used in exception handling mechanism
-
throws
-
throwable
-
throw
-
none of these
-
Answer: C
10.Consider a linked list of n elements. What is the time taken to insert an element pointer ?
-
O(log2n)
-
O(n)
-
O(1)
-
O(n log2n)
-
Answer: B
11.The fields in a class of a c program are by default __________
Answer: private
12.In C dynamic memory allocation done by __________
Answer: new operator
13.A Reference variable provides__________
Answer: Alias for variable
14.The program design method in Object Oriented Programs __________
Answer: Bottom - Up programming
15.Declaration of destructor for a class ‘A’ is ________
Answer: ~A()
16.<<is known as ________operator
Answer: insertion
17.One of the collision handling method ________
Answer: direct chaining or open addressing
18.constructor is declared in________ section of the class
Answer: public
19.Pointer to member declaratory in C is ________
Answer: : : *
20.A static function can have access to only ________ members
Answer: static data