PATNI Previous Years Solved Sample Placement Papers
-
Which of the following function is used to find the first occurrence of a given string in another string?
A. strchr()
B. strrchr()
C. strstr()
D. strnset()
Ans: C -
You have a bucket of jelly beans. Some are red, some are blue, and some green. With your eyes closed, pick out 2 of a like color. How many do you have to grab to be sure you have 2 of the same?
A: 2
B: 4
C: 5
D: 6
Ans: B -
A rectangular park 60 m long and 40 m wide has two concrete crossroads running in the middle of the park and rest of the park has been used as a lawn. If the area of the lawn is 2109 sq. m, then what is the width of the road?
A: 2.91 m
B: 3 m
C: 5.82 m
D: None of these
Ans: B -
My voice reverberated _____________ the walls of the castle.
A) With
B) From (Ans)
C) In
D) On
-
The reward was not commensurate _________ the work done by us.
A) For
B) On
C) With (Ans)
D) Order
-
Our tragic experience in the recent past provides an index _______ the state of lawlessness in this region.
A) Of (Ans)
B) In
C) At
D) By
-
Your conduct smacks ___________ recklessness.
A) Of (Ans)
B) With
C) From
D) In
-
Which of the following is true?
A) Larger the order of B-tree, less frequently the split occurs (Ans)
B) Larger the order of B-tree, more frequently the split occurs
C) Smaller the order of B-tree, more frequently the split occurs
D) Smaller the order of B-tree, less frequently the split occurs
-
How many children does a binary tree have?
A) 2
B) Any number of children
C) 0 or 1 or 2 (Ans)
D) 0 or 1
-
What is/are the disadvantages of implementing a tree using normal arrays?
A) Difficulty in knowing children nodes of a node
B) Difficult in finding the parent of a node
C) Have to know the maximum number of nodes possible before creation of trees (Ans)
D) Difficult to implement
-
What must be the ideal size of an array if the height of the tree is ‘l’?
A) 2l-1 (Ans)
B) l-1
C) l
D) 2l
-
What are the children for node ‘w’ of a complete binary tree in an array representation?
A) 2w and 2w+1 (Ans)
B) 2+w and 2-w
C) w+1/2 and w/2
D) w-1/2 and w+1/2
-
What is the parent for a node ‘w’ of a complete binary tree in an array representation when w is not 0?
A) floor((w-1)/2) (Ans)
B) ceil((w-1)/2)
C) (w-1)/2
D) w/2
-
Stack performs the operation:
A: Last in, first out
B: Last in, last out
C: Last in, fast out
D: First in, first out
Ans: A -
In which operation is the stack not modified?
A: Push(item)
B: Pop()
C: Peek()
D: None
Ans: C -
What is the function of the Peek() operation?
A: Removes the top item from the stack
B: Tests if the stack is empty or not
C: Returns the number of items in the stack
D: Returns the top item from the stack but does not remove it
Ans: D