Font size
WorksheetsData Structure
Total questions: 10
Worksheet time: 6mins
The stack uses which policy out of the following
LIFO
FIFO
FILO
NONE
(a) is very useful in situation when data have to stored and then retrieved in reverse order.
The post fix form of (A + B) *C is
AB+ C*
ABC*+
ABC*+
ABC*+
Given a prefix and a postfix notation what are the difference between them?
The postfix equation is solved starting from the right whereas the prefix notation is solved from the left
The postfix equation is solved starting from the left whereas the prefix notation is solved from the right
The postfix equation is solved starting from the left whereas the prefix notation is solved from the right
The postfix equation is solved starting from the left whereas the prefix notation is solved from the left
The result of evaluating the postfix expression 5,4,6,+,*,4,9,3,/,+,* is
600
250
400
350
Which one of the following is an application of Stack Data Structure?
Managing function calls
Arithmetic expression evaluation
CPU Scheduling
All of the above
Consider the following pseudocode that uses a stack
declare a stack of characters
while ( there are more characters in the word to read ){
{
read a character
push the character on the stack
}
while ( the stack is not empty )
{ pop a character off the stack
write the character to the screen
}
What is output for input "computer"?
computer
computercomputer
retupmocretupmoc
retupmoc
The following postfix expression with single digit operands is evaluated using a stack:
8 2 3 ^ / 2 3 * + 5 1 * -
6,1
3,2
5,7
1,5
The prefix form of A-B/ (C * D ^ E) is?
-/*^ACBDE
-ABCD*^DE
-A/B*C^DE
-A/BC*^DE
what will be the result of the below given expression in prefix form
- + 2 3 8
-3
7
3
-7
