Font size
WorksheetsQuiz 1 Stack [Pre-Test]
Total questions: 15
Worksheet time: 9mins
The process of inserting an element in stack is called?
Create
Push
Evaluation
Pop
The process of removing an element from stack is called?
Create
Push
Evaluation
Pop
In a stack, if the user tries to remove an element from an empty stack it is called?
Underflow
Empty Collection
Overflow
Garbage Collection
When pushing an element into the stack that is already having five elements and stack size of 5, then stack becomes?
Overflow
Crash
Underflow
Full
A stack is a data structure in which elements?
Can be added to any position and removed only from the top
Can be only added to the top and removed from any position
Can be added and removed from the top only
Can be added and removed from any position
Only top element can be accessed in stack?
TRUE
FALSE
MAYBE
SOMETIMES
Consider the following operation performed on a stack of size 5.
Push(1);
Pop();
Push(2);
Push(3);
Pop();
Push(4);
Pop();
Pop();
Push(5);
After the completion of all operation, the no of element present on stack is?
1
2
3
5
It is used to specify the form of an object and it combines data representation and methods for manipulating that data into one neat package.
Class
Struct
Node
Encapsulation
(a) data and functions are accessible inside that class only.
(a) data and functions are accessible both inside and outside the class.
To look at elements in the top of the stack without removing them.
(a)
In order to keep track of current topmost element of the stack we need to maintain one variable.
YES
NO
Both YES and NO
None of the Choices
Select a real life situation implementing stack data structure.
The cars garage the first car in will be the last car out of the garage
The batteries in a flashlight
The person wear bangles
All of the Choices
If the elements “A”, “B”, “C” and “D” are placed in a stack and are deleted one at a time, in what order will they be removed?
ABCD
DCBA
DCAB
ABDC
The elements are remove from the stack in ________ order.
Reverse
Hierarchical
Alternative
Sequential
