1) If the sequence of operations - push(1), push(2), pop, push(1), push(2), pop,
pop, pop, push(2), pop are performed on a stack, the sequence of popped out
values are ?
A) 2, 2, 1, 1, 2
B) 2, 2, 1, 2, 2
C) 2, 1, 2, 2, 1
D) 2, 1, 2, 2, 2
Explanation: The elements are popped from the top of the stack.
2) Queue can be used to implement ?
A) radix sort
B) quick sort
C) recursion
D) depth first search
3) The postfix equivalent of the prefix * + ab - cd is ?
A) ab + cd - *
B) abcd + - *
C) ab + cd * -
D) ab + - cd *
4) The terms PUSH and POP are related to ?
A) Arrays
B) Stacks
C) Linked List
D) None
5) Minimum number of queues needed to implement the priority queue?
A) four
B) three
C) two
D) one
6) The data structure required to evaluate a postfix expression is
(A) queue
(B) stack
(C) array
(D) linked-list
,7) What data structure would you mostly likely see in a nonrecursive
implementation of a recursive algorithm?
(A) Stack
(B) Linked list
(C) Queue
(D) Trees
8) Let the following circular queue can accommodate maximum six elements with
the
following data
front = 2 rear = 4
queue = _______; L, M, N, ___, ___
What will happen after ADD O operation takes place?
(A) front = 2 rear = 5
queue = ______; L, M, N, O, ___
(B) front = 3 rear = 5
queue = L, M, N, O, ___
(C) front = 3 rear = 4
queue = ______; L, M, N, O, ___
(D) front = 2 rear = 4
queue = L, M, N, O, ___
9) A queue is a,
(A) FIFO (First In First Out) list
. (B) LIFO (Last In First Out) list.
(C) Ordered array.
(D) Linear tree
10) What is the result of the following operation
Top (Push (S, X))
(A) X
(B) null
(C) S
(D) None of these.
,11) Which data structure is used for implementing recursion?
(A) Queue.
(B) Stack.
(C) Arrays.
(D) List.
12) The process of accessing data stored in a serial access memory is similar to
manipulating data on a ------?
a) Heap
b) Binary Tree
c) Array
d) Stack
13) Consider the linked list implementation of a stack. Which of the following
node is considered as Top of the stack?
a) First node
b) Last node
c) Any node
d) Middle node
14) Consider the following operation performed on a stack of size 5.
Push(1);
Pop();
Push(2);
Push(3);
Pop();
Push(4);
Pop();
Pop();
Push(5);
After the completion of all operation, the no of element present on stack are
a) 1
b) 2
, c) 3
d) 4
15) Which of the following is not an inherent application of stack?
a) Reversing a string
b) Evaluation of postfix expression
c) Implementation of recursion
d) Job scheduling
16) Consider the following array implementation of stack:
#define MAX 10
Struct STACK
{
Int arr [MAX];
Int top = -1;
}
If the array index starts with 0, the maximum value of top which does not cause
stack overflow is?
a) 8
b) 9
c) 10
d) 11
17) What is the minimum number of stacks of size n required to implement a
queue of size n?
a) One
b) Two
c) Three
d) Four
pop, pop, push(2), pop are performed on a stack, the sequence of popped out
values are ?
A) 2, 2, 1, 1, 2
B) 2, 2, 1, 2, 2
C) 2, 1, 2, 2, 1
D) 2, 1, 2, 2, 2
Explanation: The elements are popped from the top of the stack.
2) Queue can be used to implement ?
A) radix sort
B) quick sort
C) recursion
D) depth first search
3) The postfix equivalent of the prefix * + ab - cd is ?
A) ab + cd - *
B) abcd + - *
C) ab + cd * -
D) ab + - cd *
4) The terms PUSH and POP are related to ?
A) Arrays
B) Stacks
C) Linked List
D) None
5) Minimum number of queues needed to implement the priority queue?
A) four
B) three
C) two
D) one
6) The data structure required to evaluate a postfix expression is
(A) queue
(B) stack
(C) array
(D) linked-list
,7) What data structure would you mostly likely see in a nonrecursive
implementation of a recursive algorithm?
(A) Stack
(B) Linked list
(C) Queue
(D) Trees
8) Let the following circular queue can accommodate maximum six elements with
the
following data
front = 2 rear = 4
queue = _______; L, M, N, ___, ___
What will happen after ADD O operation takes place?
(A) front = 2 rear = 5
queue = ______; L, M, N, O, ___
(B) front = 3 rear = 5
queue = L, M, N, O, ___
(C) front = 3 rear = 4
queue = ______; L, M, N, O, ___
(D) front = 2 rear = 4
queue = L, M, N, O, ___
9) A queue is a,
(A) FIFO (First In First Out) list
. (B) LIFO (Last In First Out) list.
(C) Ordered array.
(D) Linear tree
10) What is the result of the following operation
Top (Push (S, X))
(A) X
(B) null
(C) S
(D) None of these.
,11) Which data structure is used for implementing recursion?
(A) Queue.
(B) Stack.
(C) Arrays.
(D) List.
12) The process of accessing data stored in a serial access memory is similar to
manipulating data on a ------?
a) Heap
b) Binary Tree
c) Array
d) Stack
13) Consider the linked list implementation of a stack. Which of the following
node is considered as Top of the stack?
a) First node
b) Last node
c) Any node
d) Middle node
14) Consider the following operation performed on a stack of size 5.
Push(1);
Pop();
Push(2);
Push(3);
Pop();
Push(4);
Pop();
Pop();
Push(5);
After the completion of all operation, the no of element present on stack are
a) 1
b) 2
, c) 3
d) 4
15) Which of the following is not an inherent application of stack?
a) Reversing a string
b) Evaluation of postfix expression
c) Implementation of recursion
d) Job scheduling
16) Consider the following array implementation of stack:
#define MAX 10
Struct STACK
{
Int arr [MAX];
Int top = -1;
}
If the array index starts with 0, the maximum value of top which does not cause
stack overflow is?
a) 8
b) 9
c) 10
d) 11
17) What is the minimum number of stacks of size n required to implement a
queue of size n?
a) One
b) Two
c) Three
d) Four