# Data Structure MCQ - Stack

This section focuses on the "Stack" of the Data Structure. These Multiple Choice Questions (mcq) should be practiced to improve the Data Structure skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

1. Which one of the following is an application of Stack Data Structure?

View Answer

2. Process of inserting an element in stack is called ____________.

View Answer

3. The postfix form of A*B+C/D is?

View Answer

4.Which of the following is true about linked list implementation of stack?

View Answer

5.In a stack, if a user tries to remove an element from empty stack it is called _________.

View Answer

6. Consider the following pseudocode that uses a stack. What is output for input "letsfindc"?

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 }

View Answer

7.Entries in a stack are "ordered". What is the meaning of this statement?

View Answer

8. The prefix form of A-B/ (C * D ⋀ E) is?

View Answer

9.Following is an incorrect pseudocode for the algorithm which is supposed to determine whether a sequence of parentheses is balanced: Which of these unbalanced sequences does the above code think is balanced?

declare a character stack while ( more input is available) { read a character if ( the character is a '(' ) push it on the stack else if ( the character is a ')' and the stack is not empty ) pop a character off the stack else print "unbalanced" and exit } print "balanced"

View Answer

10.What is the value of the postfix expression 6 3 2 4 + – *:

View Answer

11. Process of removing an element from stack is called __________

View Answer

12.Pushing an element into stack already having five elements and stack size of 5 , then stack becomes

View Answer

13. Which of the following applications may use a stack?

View Answer

14.Consider the usual algorithm for determining whether a sequence of parentheses is balanced.

The maximum number of parentheses that appear on the stack AT ANY ONE TIME when the algorithm analyzes: (()(())(())) are:

View Answer

15.Consider the usual algorithm for determining whether a sequence of parentheses is balanced.

Suppose that you run the algorithm on a sequence that contains 2 left parentheses and 3 right parentheses (in some order).

The maximum number of parentheses that appear on the stack AT ANY ONE TIME during the computation?

View Answer

16. The data structure required to check whether an expression contains balanced parenthesis is?

View Answer

17. Here is an infix expression: 4 + 3*(6*3-12). Suppose that we are using the usual stack algorithm to convert the expression from infix to postfix notation.

The maximum number of symbols that will appear on the stack AT ONE TIME during the conversion of this expression?

View Answer

18. What data structure would you mostly likely see in a non recursive implementation of a recursive algorithm?

View Answer

19.The process of accessing data stored in a serial access memory is similar to manipulating data on a ________

View Answer

20.The postfix form of A*B+C/D is?

View Answer

21. Which data structure is needed to convert infix notation to postfix notation?

View Answer

22. The prefix form of A-B/ (C * D ^ E) is?

View Answer

23. The postfix form of A*B+C/D is?

View Answer

24.What is the result of the following operation

Top (Push (S, X))

View Answer

25.The prefix form of an infix expression p + q – r * t is?

View Answer

**Also Check : **

Discussion