Site icon T4Tutorials.com

Stacks Solved MCQs Questions Answers

1. . In stack, the process of inserting a value is called ____________

(A) Create


(B) Push


(C) Pop


(D) Evaluation



2. . In stack, the process of removing a value is called __________

(A) Create


(B) Push


(C) Evaluation


(D) Pop



3. . If a user tries to remove a value from an empty stack, it is called _________

(A) Underflow


(B) Empty collection


(C) Overflow


(D) Garbage Collection



4. . In a stack of size 5, pushing more than five values into the stack causes

(A) Overflow


(B) User flow


(C) Crash


(D) Underflow



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


(D) There is a sequential entry that is one by one



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 processes



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

What is the maximum number of parentheses that appear on the stack at any one time when analyzing: (()(())(()))?


(A) 1


(B) 2


(C) 3



8. . Suppose that you run the usual parentheses balancing algorithm on a sequence that contains 2 left parentheses and 3 right parentheses.

What is the maximum number of parentheses on the stack at any one time?


(A) 1


(B) 2


(C) 6



9. . What is the value of the postfix expression 6 3 2 4 + – *?

(A) 1


(B) 40


(C) 74


(D) -18



10. . Given the infix expression: 4 + 3 * (6 * 3 – 12),

what is the maximum number of symbols that will appear on the stack during the conversion to postfix?


(A) 6


(B) 5


(C) 3



 

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

Exit mobile version