Data Structures 10th Sep

Data Structures 10th Sep

University

5 Qs

quiz-placeholder

Similar activities

Data Structures Quiz-2

Data Structures Quiz-2

University

10 Qs

Python Basic level 1

Python Basic level 1

University

10 Qs

DS Quiz1

DS Quiz1

University

10 Qs

computer science quiz

computer science quiz

University

10 Qs

Data Structure & Algorithm

Data Structure & Algorithm

University

10 Qs

DSA - Intro

DSA - Intro

University

10 Qs

DSA Day 3

DSA Day 3

University

9 Qs

DATA STRUCTURE QUIZ 1- INTRO TO DATA STRUCTURES

DATA STRUCTURE QUIZ 1- INTRO TO DATA STRUCTURES

University

10 Qs

Data Structures 10th Sep

Data Structures 10th Sep

Assessment

Quiz

Computers

University

Medium

Created by

Siddharth Amdal

Used 2+ times

FREE Resource

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.