Data Structures 10th Sep

Data Structures 10th Sep

University

5 Qs

quiz-placeholder

Similar activities

Node.js

Node.js

University

10 Qs

WAN Sesi 1

WAN Sesi 1

1st Grade - University

10 Qs

GUESS THE ANSWER

GUESS THE ANSWER

University

10 Qs

Kuis 1 User Interface JWD

Kuis 1 User Interface JWD

University

10 Qs

Round 2

Round 2

University

10 Qs

Software Testing

Software Testing

University

10 Qs

C++ Array Quiz

C++ Array Quiz

University

10 Qs

Computer Basics 2 - CESA

Computer Basics 2 - CESA

7th Grade - University

10 Qs

Data Structures 10th Sep

Data Structures 10th Sep

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Siddharth Amdal

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

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

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Q1. If the size of the stack is 10 and we try to add the 11th element in the stack then the condition is known as___

Underflow

Garbage collection

Overflow

None of the above

Answer explanation

When a stack has a maximum size and we attempt to add an element beyond that limit, it results in 'Overflow'. This occurs because the stack cannot accommodate more elements than its defined capacity.

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Q2. Which of the following is not the correct statement for a stack data structure?

Arrays can be used to implement the stack

Stack follows FIFO

Elements are stored in a sequential manner

Top of the stack contains the last inserted element

Answer explanation

The statement 'Stack follows FIFO' is incorrect. A stack follows LIFO (Last In, First Out) principle, meaning the last element added is the first one to be removed.

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Q3. If the elements '1', '2', '3' and '4' are added in a stack, so what would be the order for the removal?

1234

2134

4321

None of the above

Answer explanation

In a stack, elements are removed in Last In First Out (LIFO) order. Since '4' is added last, it will be the first to be removed, followed by '3', '2', and '1'. Thus, the removal order is 4321.

4.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Q4. Which of the following principles does a Queue use?

LIFO principle

FIFO principle

Linear Tree

Ordered Array

Answer explanation

A Queue uses the FIFO (First In, First Out) principle, meaning the first element added is the first one to be removed. This is different from LIFO (Last In, First Out), which is used by stacks.

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Q5. A linear list of elements in which deletion can be done from one end(front) and insertion can take place only at the other end(rear) is known as:

Queue

Stack

Tree

Linked List

Answer explanation

A queue is a linear data structure where insertion occurs at the rear and deletion at the front, following the First In First Out (FIFO) principle. This matches the description given in the question.

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