Trilogy Previous Years Solved Sample Placement Papers
-
What is the output of the following code
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 -
The process of building new classes from existing one is called ______.
A: Polymorphism
B: Structure
C: Inheritance
D: Cascading
Ans: C -
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.
D: protected data in A and B.
Ans: D -
In which operation are array elements shifted into lower-order positions?
A: Deletion
B: Insertion
C: Searching
D: Sorting
Ans: A -
In a linked list, the position "start" gives the location of the:
A: First node
B: Last node
C: Middle node
D: Second node
Ans: A -
In a linked list, the pointer "start" position is also called:
A: NULL
B: Head
C: Tail
D: None
Ans: B - Which operation is used to change data in data structure
a) create
b) destroy
c) select
d) update
Answer: d) update - The study of data structure mainly deals with
a) implementation of structure on computers
b) mathematical description of structure
c) to determine amount of space in memory
d) all of these
Answer: d) all of these -
The library function
exit()
causes an exit from:A: The loop in which it occurs
B: The block in which it occurs
C: The function in which it occurs
D: The program in which it occurs
Ans: D -
The
getche()
library function:A: Returns a character when any key is pressed
B: Returns a character when ENTER is pressed
C: Displays a character on the screen when any key is pressed
D: Does not display a character on the screen
Ans: A -
The conversion from basic data to class type can be done by .......
A: Writing constructor
B: Is not possible
C: overloaded casting operator
D: object of a class
Ans: A -
When a base class pointer points to derived class object?
A: It can access only base class members
B: It can access only derived class members
C: Both base class & derived class members
D: None
Ans: A - Various application software is based on data structure
a) linked list
b) graph
c) stack
d) queue
Answer: c) stack - In which of the following application queue data structure is used
a) simulation
b) type scheduling algorithm
c) print server routine
d) all of these
Answer: d) all of these - In which data structure element can be inserted and removed in any position
a) simple queue
b) circular queue
c) priority queue
d) double ended queue
Answer: d) double ended queue - In which queue addition and deletion takes place at both the ends
a) simple queue
b) circular queue
c) priority queue
d) double ended queue
Answer: d) double ended queue -
Which of the following statement is correct?
A: Overloaded functions can have at most one default argument.
B: An overloaded function cannot have default argument.
C: All arguments of an overloaded function can be default.
D: A function if overloaded more than once cannot have default argument.
Ans: C -
Which of the following statement is correct?
A: Constructors can have default parameters.
B: Constructors cannot have default parameters.
C: Constructors cannot have more than one default parameter.
D: Constructors can have at most five default parameters.
Ans: A