No student devices needed. Know more
20 questions
_________________ is a collection of elements used to store the same type of data.
Array
Function
Case
Loop
Act of adding values into a stack is called
Pop
Poll
Push
Insert
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
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, get the total number of element present in stack is
1
2
3
4
Only the top element can be accessed in stack
TRUE
FALSE
Which of them is an abstract data structure (ADT)?
Stacks
Functions
Queues
Both A and C
Which of the following uses the FIFO method
Queue
stack
linked list
none of the above
Which function is called in a POP() function
IsEmpty()
IsFull()
Consider Stack is implemented using the array.
#define MAX 10
struct STACK
{
int arr[MAX]
int top = ___________;
}
What will be the initial value with which top is initialized.
0
-1
10
1
Consider the following operations performed on a stack of size 5:
Push (a); Pop() ; Push(b); Push(c); Pop(); Push(d); Pop();Pop(); Push (e)
Which of the following statements is correct?
Underflow occurs
Stack operations are performed smoothly
Overflow occurs
None of the above
Consider the following sequence of operations performed on a stack:
push (1), push (2), pop, push (1), push (2), pop, pop, pop, push (2), pop.
What is the sequence of popped out values?
2,2,1,1,2
2,2,1,2,2
2,1,2,2,1
2,1,2,2,2
In a stack, if a user tries to remove an element from an empty stack it is called _________
Underflow
Empty collection
Overflow
An error
The process of removing an element from a stack is called ____________
Delete
Push
Insert
Pop
User perform following operations on stack of size 5 then -
push(1);
pop();
push(2);
push(3);
pop();
push(2);
pop();
pop();
push(4);
pop();
pop();
push(5);
Overflow Occurs
Stack Operations will be performed Smoothly
Underflow Occurs
None of these
List of data in which element can be inserted and removed at the same end is called a/an __________.
array
stack
linked list
queue
If the user push 1 element in the stack already containing five elements and having stack size as 5 then the stack becomes an ___________.
Overflow
User Flow
Underflow
Error
Consider above is a Stack implemented using the array.
In this implementation of stack maximum value of top which cannot cause overflow will _________.
11
10
9
None of the answer
An array is said to permit random access of values stored in that data structure. Implementing stacks using arrays means that any item stored in the stack can be accessed randomly.
True
False
Explore all questions with a free account