Stacks Solved MCQs Questions Answers

Stacks Solved MCQs Questions Answers

Let us see the Stacks Solved MCQs Questions Answers.

1. In stack Process of inserting an value is called ____________
a. Create
b. Push
c.Pop
d. Evaluation
e. both a & b
f.none of these
Answer b

2. In stack the process of removing an from is called __________
a. Create
b. Push
c. Evaluation
d. Pop
e. both a & b
f. none of these

Answer d
3. If user tries to remove value from empty stack it is called _________
a. Underflow
b. Empty collection
c. Overflow
d. Garbage Collection
e. both a & b
f. none of these

Answer: a
4. In a stack of size of 5, Pushing values into stack more than five, then stack becomes
a. Overflow
b. User flow
c. Crash
d. Underflow
e. both a & b
f. none of these

Answer: a

5. What is meant by this statement : Entries in a stack are “ordered”.?

a. A collection of stacks is sortable
b. The entries are stored in a linked ‘<‘ operation
c.listStack entries may be compared with the
d. There is a Sequential entry that is one by one
e. both a & b
f. none of these

Answer : d

6. Which of the following applications may use a stack?
a) Parentheses balancing program
b) Tracking of local variables at run time
c) Compiler Syntax Analyzer
d) Data Transfer between two asynchronous process

Answer: d
7. 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:
a) 1
b) 2
c) 3
d) 4 or more
View Answer

Answer: c
8. 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?
a) 1
b) 2
c) 6
d) 4 or more

Answer: b
9. What is the value of the postfix expression 6 3 2 4 + – *:
a) 1
b) 40
c) 74
d) -18
View Answer

Answer: d
10. 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.
In this scenario, what will be the maximum number of symbols that will appear on the stack at the given time during the conversion of this expression?
a) 6
b) 5
c) 3
d) 4

Answer: d

Data Structures MCQs

Basic Concepts

  1. Introduction to Data Structures
  2. Complexity Analysis MCQs

Linear Data Structures MCQs

  1. Arrays MCQs
  2. Linked Lists MCQs
  3. Stacks MCQs
  4. Queues MCQs

Non-Linear Data Structures MCQs

  1. Trees MCQs
  2. Heaps MCQs
  3. Graphs MCQs

Hashing MCQs MCQs

  1. Hash Tables

Sorting and Searching Algorithms MCQs 

  1. Sorting Algorithms MCQs
  2. Searching Algorithms MCQs

Miscellaneous

  1. Memory Management in data structures MCQs
  2. String Manipulation Algorithms MCQs
  1. Data Structures MCQs 1
  2. Data Structures MCQs 2
  3. Data Structures MCQs 3
  4. Data Structures MCQs 4
  5. Data Structures MCQs 5
  6. Stacks Solved MCQs
  7. Queues MCQs
  8. pointer mcqs
  9. Array MCQs

 

Computer Science Repeated MCQs Book Download

Add a Comment