What is a stack in data structure?

Stack Implementation in C

Quiz
•
Other
•
University
•
Medium
Karthick M
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A stack is a data structure that allows random access to its elements.
A stack is a non-linear data structure.
A stack is a linear data structure that follows the Last-In-First-Out (LIFO) principle.
A stack is a linear data structure that follows the First-In-First-Out (FIFO) principle.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the two main operations performed on a stack?
insert and remove
add and remove
enqueue and dequeue
push and pop
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How is a stack implemented using an array in C?
Using a linked list instead of an array.
Using a queue instead of a stack.
Using a binary tree instead of an array.
Using a fixed-size array and a top variable to keep track of the top element.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of push and pop operations in a stack implemented using an array?
O(log n)
O(n^2)
O(1)
O(n)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of accessing the top element of a stack implemented using an array?
O(log n)
O(n)
O(1)
O(n^2)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a stack overflow?
A stack overflow is when a program's variables exceed their maximum size.
A stack overflow is when a program's call stack exceeds its maximum size.
A stack overflow is when a program encounters an infinite loop.
A stack overflow is when a program runs out of memory.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a stack underflow?
An item is popped from a full stack.
An item is popped from an empty stack.
An item is pushed onto an empty stack.
An item is pushed onto a full stack.
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
UNIT 2:VENTILATION

Quiz
•
University
13 questions
Google Sheet Advanced

Quiz
•
University
13 questions
Java Programming Quiz

Quiz
•
University
10 questions
Data Structures Quiz

Quiz
•
University
15 questions
QUiZ MEMBER AAPG 2024

Quiz
•
University
12 questions
Pre test P1 Algodat

Quiz
•
University
12 questions
أسئلة عن هياكل البيانات

Quiz
•
University
10 questions
Aaruth Quiz

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Other
10 questions
Identifying equations

Quiz
•
KG - University
15 questions
Music 2016

Quiz
•
KG - 12th Grade
44 questions
logos

Quiz
•
KG - University
20 questions
Disney Characters

Quiz
•
KG
20 questions
Kids shows

Quiz
•
KG
20 questions
Guess that Disney

Quiz
•
KG - 5th Grade
20 questions
Cartoon Characters!

Quiz
•
KG - 5th Grade