Stack - MCQ_ Attempt Review
Stack - MCQ_ Attempt Review
State Finished
Completed on Monday, 23 September 2024, 2:57 PM
Time taken 19 mins 15 secs
Marks 19.00/19.00
Grade 100.00 out of 100.00
Name HARSHINE S 730423243041
Question 1
Correct
Which application of stack is used to ensure that the pair of parentheses is properly nested?
B. Balancing symbols
D. Reversing a stack
Question 2
Correct
a. pop
b. poke
c. push
d. peek
pop,
peek
Question 3
Correct
Find the error (if any) in the following code snippet for pop operation. void pop() //removing an element from a stack
printf(“%s”, stack[top++]);
The correct answer is: pop operation is performed, but top moved in wrong direction
Question 4
Correct
Which of the following statement is incorrect with respect to evaluation of infix expression algorithm?
Correct
A. Stack
B. List
C. Array
D. Queue
Question 6
Correct
Which of the following real world scenarios would you associate with a stack data structure?
Correct
What is the time complexity of pop() operation when the stack is implemented using an array?
A. O(logn)
B. O( N )
C. O(1)
D. O(nlogn)
Question 8
Correct
In a stack, if a user tries to remove an element from empty stack it is called _________
A. Underflow
B. Garbage Collection
C. Overflow
D. Empty collection
Correct
Pushing an element into stack already having five elements and stack size of 5, then stack becomes
A. Crash
B. User flow
C. Underflow
D. Overflow
Question 10
Correct