BCA DS NoN Attended

BCA DS NoN Attended

University

20 Qs

quiz-placeholder

Similar activities

Introduction - Data Structures

Introduction - Data Structures

University

25 Qs

Collections C#

Collections C#

University

20 Qs

Queue Data Structures

Queue Data Structures

University

24 Qs

Quiz Algoritma

Quiz Algoritma

10th Grade - University

15 Qs

Data Structures Quiz No 2

Data Structures Quiz No 2

University

20 Qs

Stack & Quiz

Stack & Quiz

University

20 Qs

DATSRUC Week 6

DATSRUC Week 6

10th Grade - University

15 Qs

AS Computing: Data Structures

AS Computing: Data Structures

10th Grade - University

15 Qs

BCA DS NoN Attended

BCA DS NoN Attended

Assessment

Quiz

Computers

University

Medium

Created by

rangan chellam

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary characteristic of a stack in computer science?
It follows a First In, First Out (FIFO) order.
It can only store integers.
It allows random access to elements.
It follows a Last In, First Out (LIFO) order.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a stack, what happens to the last item added when an item is removed?
It remains in the stack until the stack is empty.
It is ignored by the stack.
It is moved to the bottom of the stack.
It becomes the first item to be removed.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following operations would you use to remove the top element from a stack?
Pop
Push
isEmpty
Peek

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operation is used to add an element to the top of a stack?
Pop
Push
Size
Peek

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the Size operation do in a stack?
It returns the top element of the stack.
It checks if the stack is empty.
It returns the number of elements in the stack.
It removes the last element added.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can a stack be compared to a real-world object?
Like a pile of clothes that can be sorted at any time.
Like a box of assorted items that can be accessed from any side.
Like a stack of plates where the top plate is the first to be taken.
Like a line of people waiting for a bus.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a stack implemented using an array, what variable indicates the index of the top element?
base
top
index
count

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?