Stack

Stack

University

10 Qs

quiz-placeholder

Similar activities

CHAPTER 1: COMPUTER SECURITY REVIEW

CHAPTER 1: COMPUTER SECURITY REVIEW

University

10 Qs

Basic on Operating System

Basic on Operating System

University

10 Qs

Evaluasi Pertemuan 12 DRPL TI-3B

Evaluasi Pertemuan 12 DRPL TI-3B

University

15 Qs

Pythonintro

Pythonintro

University

15 Qs

Pop Quiz- Abstraction, Algorithm

Pop Quiz- Abstraction, Algorithm

University

14 Qs

AWS ACF Módulo 2 - Economia e Faturamento na Nuvem

AWS ACF Módulo 2 - Economia e Faturamento na Nuvem

University

15 Qs

PHAR AD - QUIZ 5 (Management Info System)

PHAR AD - QUIZ 5 (Management Info System)

University

15 Qs

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

Stack

Stack

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Kokila Kokila

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Process of inserting an element in stack is called ____________

Create

Push

Evaluation

Pop

Answer explanation

Push operation allows users to insert elements in the stack.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Process of removing an element from stack is called __________

Create

Push

Evaluation

Pop

Answer explanation

Elements in the stack are removed using pop operation. Pop operation removes the top most element in the stack i.e. last entered element.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

Underflow

Empty collection

Overflow

Garbage Collection

Answer explanation

Underflow occurs when the user performs a pop operation on an empty stack. Overflow occurs when the stack is full and the user performs a push operation. Garbage Collection is used to recover the memory occupied by objects that are no longer used.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

Overflow

Crash

Underflow

User flow

Answer explanation

The stack is filled with 5 elements and pushing one more element causes a stack overflow. This results in overwriting memory, code and loss of unsaved work on the computer.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not the application of stack?

A parentheses balancing program

Tracking of local variables at run time

Compiler Syntax Analyzer

Data Transfer between two asynchronous process

Answer explanation

Data transfer between the two asynchronous process uses the queue data structure for synchronisation. The rest are all stack applications.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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: (()(())(())) ?

1

2

3

4 or more

Answer explanation

In the entire parenthesis balancing method when the incoming token is a left parenthesis it is pushed into stack. A right parenthesis makes pop operation to delete the elements in stack till we get left parenthesis as top most element. 2 left parenthesis are pushed whereas one right parenthesis removes one of left parenthesis. 2 elements are there before right parenthesis which is the maximum number of elements in stack at run time.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

1

40

74

-18

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers