Академический Документы
Профессиональный Документы
Культура Документы
1.
Which of the following type of class allows only one object of it to be created?
A.
Virtual class
B.
Abstract class
C.
Singleton class
D.
Friend class
Answer: Option C
2.
A.
Copy constructor
B.
Friend constructor
C.
Default constructor
D.
Parameterized constructor
Answer: Option B
3.
A.
B.
C.
D.
Answer: Option B
4.
A.
Static function
B.
Friend function
C.
Const function
D.
Virtual function
Answer: Option B
5.
Which of the following concepts means determining at runtime what method
to invoke?
A.
Data hiding
B.
Dynamic Typing
C.
Dynamic binding
D.
Dynamic loading
Answer: Option C
6.
Which of the following term is used for a function defined inside a class?
A.
Member Variable
B.
Member function
C.
Class function
D.
Classic function
Answer: Option B
7.
Which of the following concept of oops allows compiler to insert arguments in
a function call if it is not specified?
A.
Call by value
B.
Call by reference
C.
Default arguments
D.
Call by pointer
Answer: Option C
8.
A.
B.
C.
13
D.
Answer: Option D
9.
A.
Function
B.
Class
C.
Object
D.
Operator function
Answer: Option C
10.
Which of the following concepts of OOPS means exposing only necessary
information to client?
A.
Encapsulation
B.
Abstraction
C.
Data hiding
D.
Data binding
Answer: Option C
11.
A.
B.
C.
D.
Answer: Option D
12.
A.
operator
B.
function
C.
object
D.
macro
Answer: Option C
13.
Which of the following concepts provides facility of using object of one class
inside another class?
A.
Encapsulation
B.
Abstraction
C.
Composition
D.
Inheritance
Answer: Option C
14.
A.
B.
C.
D.
Answer: Option B
15.
A.
int
B.
double
C.
string
D.
Class
Answer: Option D
16.
Which of the following concepts means adding new components to a program
as it runs?
A.
Data hiding
B.
Dynamic typing
C.
Dynamic binding
D.
Dynamic loading
Answer: Option D
17.
A.
B.
C.
D.
Answer: Option A
18.
A.
Virtual polymorphism
B.
Transient polymorphism
C.
Ad-hoc polymorphism
D.
Pseudo polymorphism
Answer: Option C
19.
A.
Top-down
B.
Bottom-up
C.
Right-left
D.
Left-right
Answer: Option B
20.
A.
B.
C.
D.
Both A and B.
21.
A.
B.
class data members are public by default while that of structure are private.
C.
D.
class data members are private by default while that of structure are public
by default.
Answer: Option D
22.
Which of the following concepts means wrapping up of data and functions
together?
A.
Abstraction
B.
Encapsulation
C.
Inheritance
D.
Polymorphism
Answer: Option B
23.
Which of the following concepts means waiting until runtime to determine
which function to call?
A.
Data hiding
B.
Dynamic casting
C.
Dynamic binding
D.
Dynamic loading
Answer: Option C
24.
A.
B.
C.
D.
Answer: Option B
25.
A.
>>
B.
<<
C.
D.
Answer: Option B
26.
A.
iostream
B.
istream
C.
ostream
D.
ifstream
Answer: Option C
27.
A.
class
B.
member functions
C.
constructor
D.
destructor
Answer: Option C
28.
A.
B.
C.
D.
Initialize objects
Answer: Option D
29.
A.
B.
C.
A syntax error.
D.
A run-time error.
Answer: Option D
30.
Which one of the following options is correct about the statement given
below? The compiler checks the type of reference in the object and not the type of
object.
A.
Inheritance
B.
Polymorphism
C.
Abstraction
D.
Encapsulation
Answer: Option B
31.
A.
B.
C.
D.
Both A and B
Answer: Option C
32.
A.
Virtual function
B.
Operator function
C.
Const function
D.
Static function
Answer: Option A
33.
A.
B.
C.
D.
Both A and B.
Answer: Option D
34.
Which of the following factors supports the statement that reusability is a
desirable feature of a language?
A.
B.
C.
D.
Both A and B.
Answer: Option D
35.
Which of the following ways are legal to access a class data member using
this pointer?
A.
this->x
B.
this.x
C.
*this.x
D.
*this-x
Answer: Option A
36.
A.
Operator overloading
B.
Function overloading
C.
Templates
D.
Answer: Option D
37.
Only I is true.
B.
C.
Only II is true.
D.
Answer: Option B
38.
What happens if the base and derived class contains definition of a function
with same prototype?
A.
B.
C.
D.
Base class object will call base class function and derived class object will call
derived class function.
Answer: Option D
39.
Which of the following are available only in the class hierarchy chain?
A.
B.
C.
D.
Member functions
Answer: Option C
40.
A.
Multiple
B.
Multilevel
C.
Distributive
D.
Hierarchical
Answer: Option C
41. Which of the following operators cannot be overloaded?
A.
[]
B.
->
C.
?:
D.
Answer: Option C
42.
A.
B.
C.
D.
Both A and B.
Answer: Option D
43.
A.
It speeds up execution.
B.
C.
D.
Both A and C.
Answer: Option D
44.
Which one of the following is the correct way to declare a pure virtual
function?
A.
B.
C.
D.
void Display(void) = 0;
Answer: Option C
45.
Which of the following header file includes definition of cin and cout?
A.
istream.h
B.
ostream.h
C.
iomanip.h
D.
iostream.h
Answer: Option D
46.
A.
overload
B.
operator
C.
friend
D.
override
Answer: Option B
47.
A.
B.
C.
It is not allowed.
D.
Both A and B.
Answer: Option D
48.
Multilevel inheritance
B.
Multiple inheritance
C.
Hybrid inheritance
D.
Hierarchical Inheritance
Answer: Option B
49.
Which one of the following is correct about the statements given below?
A.
Only II is correct.
B.
C.
Only I is correct.
D.
Answer: Option C
50.
A.
public
B.
private
C.
protected
D.
friend
Answer: Option D
51.
A.
B.
C.
D.
Answer: Option D
52.
A.
B.
C.
D.
Answer: Option B
53.
A.
B.
C.
D.
Answer: Option D
54.
Which of the following access specifier is used as a default in a class
definition?
A.
protected
B.
public
C.
private
D.
friend
Answer: Option C
55.
A.
A static member function can access only static data members of a class.
B.
A static data member is shared among all the object of the class.
C.
D.
Both A and B.
Answer: Option D
56. Which of the following provides a reuse mechanism?
A.
Abstraction
B.
Inheritance
C.
Dynamic binding
D.
Encapsulation
Answer: Option B
57.
A.
B.
C.
D.
Answer: Option B
58.
(A)*temp
(B)&temp
(C)float& temp
(D)float temp&
Ans: B
59.
char symbol[3]={a,b,c};
for (int index=0; index<3; index++)
cout << symbol [index];
(A)a b c
(B)abc
(C)abc
(D)abc
Ans: C
60.
The process of building new classes from existing one is called ______.
(A)Polymorphism
(B)Structure
(C)Inheritance
(D)Cascading
Ans: C
61.
If a class C is derived from class B, which is derived from class A, all through
public
inheritance, then a class C member function can access
(A)protected and public data only in C and B.
(B)protected and public data only in C.
(C)private data in A and B.
If the variable count exceeds 100, a single statement that prints Too many
64.
Ans: A
66.
(A)0 to162
(B)12 to 215 (C) 12 to 277 (D)82 to 0
Ans: B
If 2y,5x==thenyxequals________.(whereis a bitwise XOR operator)
(A)00000111
(B)10000010
(C)10100000
(D)11001000
Ans: A
67.
If an array is declared as
69.
(A)friend function
(B)virtual function
(C)operator overloading
(D)function overloading
Ans: B
70.
A function call mechanism that passes arguments to a function by passing a
copy of the values of the arguments is __________
(A)call by name
(B)call by value
(C)call by reference
(D)call by value result
Ans: B
71.
If we create a file by ifstream, then the default mode of the file is _________
(A)ios :: out
(B)ios :: in
(C)ios :: app
(D)ios :: binary
Ans: B
73.
(A)A constant.
(B)A variable.
(C)A structure.
(D)A header file.
Ans: D
76.
of text using
(A)the normal cout << combination.
(B)the cin.get( ) function with one argument.
(C)the cin.get( ) function with two arguments.
(D)the cin.get( ) function with three arguments.
Ans: C
78.The keyword friend does not appear in
(A)the class allowing access to another class.
(B)the class desiring access to another class.
(C)the private section of a class.
(D)the public section of a class.
Ans: C
79. The process of building new classes from existing
one is called
(A)structure.
(B)Inheritance.
(C)Polymorphism.
(D)Template.
Ans: B
80. If you wanted to sort many large objects or struc
tures, it would be most efficient to
(A)place them in an array & sort the array.
(B)place pointers to them in an array & sort the array
(C)place them in a linked list and sort the linked list.
(D)place references to them in an array and sort the array.
Ans: C
(B)&
(C)*
(D)>>
Ans:D
97. Consider the following statements char *ptr; ptr = hello; cout << *ptr;
What will be printed?
(A)first letter
(B)entire string
(C)it is a syntax error
(D)last letter
Ans:A
98. In which case is it mandatory to provide a destru ctor in a class?
(A)Almost in every class
(B)Class for which two or more than two objects will be created
(C)Class for which copy constructor is defined
(D)Class whose objects will be created dynamically
Ans:D
99. The members of a class, by default, are
(A)public
(B)protected
(C)private
(D)mandatory to specify
Ans:C
100. given a class named Book,
which of the following is not a valid constructor?
(A)Book ( ) { }
(B)Book ( Book b) { }
(C)Book ( Book &b) { }
(D)Book (char* author, char* title) { }
Ans:B