Stack Operations Quiz 1

Stack Operations Quiz 1

University

10 Qs

quiz-placeholder

Similar activities

Quizze Buzzie

Quizze Buzzie

University

14 Qs

Stack Data Structure

Stack Data Structure

2nd Grade - University

12 Qs

minecraft

minecraft

KG - Professional Development

9 Qs

Stack

Stack

University

10 Qs

DEMP CS #10

DEMP CS #10

University

8 Qs

Assignment for 06/07/2020

Assignment for 06/07/2020

University

10 Qs

Easy Round - WMSU ICpeP Quizbowl 2021

Easy Round - WMSU ICpeP Quizbowl 2021

University

10 Qs

Web Apps 01 - CLI (Terminal, Git, Meteor)

Web Apps 01 - CLI (Terminal, Git, Meteor)

University

15 Qs

Stack Operations Quiz 1

Stack Operations Quiz 1

Assessment

Quiz

Computers

University

Medium

Created by

HASAN YIGIT

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the peek() operation do in a stack?

Returns the top element without removing it.

Removes the top element.

Adds an element to the stack.

Clears the stack.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given the stack operations: Push(3), Push(5), Pop(), Push(7), Push(9), what is the stack content (top to bottom)?

7, 9

9, 7, 3

3, 9, 7

None of the above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data structure can evaluate postfix expressions?

Queue

Stack

Binary Tree

Linked List

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does the following code accomplish? if (stack->top capacity / 4) { resizeStack(stack, stack->capacity / 2); }

Increases the stack size.

Decreases the stack size.

Checks if the stack is empty.

Duplicates the stack.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following sequence? push(5); push(10); pop(); push(20); pop(); peek();

5

10

20

None of the above

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the condition to increase the stack size dynamically in an array implementation?

top == capacity - 1

top == 0

capacity > top

stack isEmpty()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the order of operations in infix notation?

Operators are between operands

Operators come before operands

Operators come after operands

None of the above

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?