Search Header Logo

MIDTERM EXAM - DSA - C

Authored by PPSD Arts

Information Technology (IT)

University

Used 1+ times

MIDTERM EXAM - DSA - C
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

35 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following data structures works on the principle of Last In, First Out (LIFO)?

Queue

Stack

Linked List

Tree

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operation is used to remove an element from the stack?

Pop

Push

Peek

Delete

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operation returns the top element of a stack without removing it?

Pop

Peek

Push

Display

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when you try to pop an element from an empty stack?

Stack Overflow

Stack Underflow

Null Exception

Invalid Operation

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following can be used to implement a stack?

Arrays

Linked Lists

Both A and B

Queues

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the content of the stack after performing: push(1), push(2), push(3), pop(), push(4)?

1, 2, 3

1, 2, 4

1, 3, 4

2, 3, 4

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which application uses stacks?

Recursion

Expression evaluation

Undo/Redo feature in editors

All of the above

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?