
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
What is a stack in data structure?
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 Wayground
10 questions
Social Media Advertising Strategies Quiz

Quiz
•
University
10 questions
Core Java Quiz - 2

Quiz
•
University
10 questions
Riview Materi Pertemuan 1 Struktur Data

Quiz
•
University
12 questions
Social Networks

Quiz
•
University
10 questions
Group 8 quiz

Quiz
•
University
15 questions
Quiz Planet (Round-1)

Quiz
•
University
10 questions
Understanding Arrays in Programming

Quiz
•
University
15 questions
Coding Golf Event 2

Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
20 questions
Disney Characters

Quiz
•
KG
11 questions
NFL Football logos

Quiz
•
KG - Professional Dev...
20 questions
Place Value

Quiz
•
KG - 3rd Grade
10 questions
Movie Trivia

Quiz
•
KG - 2nd Grade
20 questions
Logos

Quiz
•
KG
6 questions
Things that can move.

Quiz
•
KG
15 questions
Pronouns

Quiz
•
KG - 3rd Grade
15 questions
The Five Senses

Quiz
•
KG