Stacks on Data Structure and Algorithms related Questions and Answers - Page 2

Question 11 : What is the value of the postfix expression 2 3 + 4 5 6 – – *
1. 19
2. 21
3. 23
4. -2
View Answer   Discuss with Members

Question 12 : Which of the following is an example for a postfix expression?
1. a*b(c+d)
2. abc*+de
3. +ab
4. a+b-c
View Answer   Discuss with Members

Question 13 : Which is the most appropriate data structure for reversing a word?
1. queue
2. stack
3. tree
4. graph
View Answer   Discuss with Members

Question 14 : An error is thrown if the character '\n' is pushed in to the character stack.
1. true
2. false
3.
4.
View Answer   Discuss with Members

Question 15 : How many passes does the balancing symbols algorithm makes through the input?
1. one
2. two
3. three
4. four
View Answer   Discuss with Members

Question 16 : In Postfix expressions, the operators come after the operands.
1. True
2. False
3.
4.
View Answer   Discuss with Members

Question 17 : Which data structure can be used to test a palindrome?
1. Tree
2. Heap
3. Stack
4. Priority queue
View Answer   Discuss with Members

Question 18 : The postfix expression abc+de/*- is equivalent to which of the following infix expression
1. abc+-de*/
2. (a+b)-d/e*c
3. a-(a+b)*(d/e)
4. abc+*-(d/e)
View Answer   Discuss with Members

Question 19 : When the corresponding end bracket/braces/parentheses is not found, what happens?
1. The stack is popped
2. Ignore the parentheses
3. An error is reported
4. It is treated as an exception
View Answer   Discuss with Members

Question 20 : If -*+abcd = 11, find a, b, c, d using evaluation of prefix algorithm.
1. a=2, b=3, c=5, d=4
2. a=1, b=2, c=5, d=4
3. a=5, b=4, c=7,d=5
4. a=1, b=2, c=3, d=4
View Answer   Discuss with Members


View 11 - 20 of 77 Questions

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter