Stacks In Data Structures — Part 2 MCQs with Explanations
Practice high-yield Computer Science & IT MCQs on Stacks In Data Structures — Part 2 with worked academic solutions for PPSC, FPSC, CSS, PMS, NTS.
Questions
40
Difficulty Level
Exam-Level
Target Exams
PPSC, FPSC, CSS...
Estimated Time
48 mins
Exam-Level PPSC FPSC CSS PMS NTS
Verified for Commission Syllabus • Oct 14, 2026
40
Verified Practice Questions
Interactive test mode with detailed academic worked solutions
Live Progress | 0/40 answered
✓ 0 correct
✗ 0 wrong
0% score
🎉 Set complete! All 40 questions answered.
Question 1 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Question 2 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following correctly describes a stack's push operation in terms of its effect on the stack?
Question 3 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the maximum number of elements that can be held in a stack if it has a capacity of 20 and 5 elements are pushed and then 3 elements are popped?
Question 4 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What type of stack implementation allows for the stack to grow dynamically as needed?
Question 5 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Evaluate the following and choose the correct answer. a/b+c*d where a=4, b=2, c=2, d=1.
Question 6 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What would be the Prefix notation for the given equation? a+b-c/d&e|f
Question 7 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the time complexity of balancing parentheses algorithm?
Question 8 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Using the evaluation of infix expression, evaluate a^b+c and choose the correct answer. (a=2, b=2, c=2)
Question 9 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Evaluate the postfix expression ab + cd/- where a=5, b=4, c=9, d=3.
Question 10 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the correct postfix expression for the following expression? a+b*(c^d-e)^(f+g*h)-i
Question 11 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What would be the solution to the given prefix notation? / / / 16 4 2 1
Question 12 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the time complexity of an infix to postfix conversion algorithm?
Question 13 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What would be the Prefix notation and Postfix notation for the given equation? A+B+C
Question 14 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Is the given statement ((A+B) + [C-D]] valid with respect to balancing of symbols?
Question 15 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What would be the Prefix notation for the given equation? A+B*C^D
Question 16 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Consider the stack | 5 | | 4 | | 3 | | 2 |. At this point, '*' is encountered. What has to be done?
Question 17 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What would be the solution to the given prefix notation? - + 1 2 * 3 / 6 2
Question 18 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Parentheses are simply ignored in the conversion of infix to postfix expression.
Question 19 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the time complexity for converting decimal to binary numbers?
Question 20 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What should be done when an opening parentheses is read in a balancing symbols algorithm?
Question 21 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What is the value of the postfix expression 2 3 + 4 5 6 - - *
Question 22 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Evaluation of infix expression is done based on precedence of operators.
Question 23 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following statement is incorrect with respect to evaluation of infix expression algorithm?
Question 24 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Reverse Polish Notation is the reverse of a Polish Notation.
Question 25 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Using the evaluation of prefix algorithm, evaluate +-9 2 7.
Question 26 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following statement is incorrect with respect to balancing symbols algorithm?
Question 27 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
An error is reported when the stack is not empty at the end.
Question 28 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
How many stacks are required for reversing a word algorithm?
Question 29 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Evaluate the following infix expression using algorithm and choose the correct answer. a+b*c-d/e^f where a=1, b=2, c=3, d=4, e=2, f=2.
Question 30 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
The time complexity of converting a prefix notation to infix notation is . . . . . . . .
Question 31 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What will be the output of the following program? main() { char str[]="hello india"; int len = strlen(str); int i; for(i=0;i<len;i++) push(str[i]); // pushes an element into stack for(i=0;i<len;i++) pop(); //pops an element from the stack }
Question 32 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which is the most appropriate data structure for reversing a word?
Question 33 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
The postfix expression abc+de/*- is equivalent to which of the following infix expression?
Question 34 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
An error is thrown if the character '\n' is pushed in to the character stack.
Question 35 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following is valid reverse polish expression?
Question 36 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
The prefix expression of the postfix expression AB+CD-* is . . . . . . . .
Question 37 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of these operators have the highest order of precedence?
Question 38 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
From the given expression tree, identify the infix expression, evaluate it and choose the correct result.
Question 39 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What would be the solution to the given prefix notation? + 9 * 3 / 8 4
Question 40 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
How many stacks are required for applying evaluation of infix expression algorithm?
✓ Link copied to clipboard
Continue Your Practice
Next Practice Set → Advanced Mapreduce Concepts — Part 1
Master the next curriculum module with 40 exam-standard MCQs.
💡 Examiner's Advisory for Computer Science & IT
In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.
More Modules in Computer Science & IT
View All → Advanced Mapreduce Concepts — Part 1
40 MCQs
Practice →
Advanced Mapreduce Concepts — Part 2
40 MCQs
Practice →
Advanced Sql
29 MCQs
Practice →
Advanced Trees _Avl_ Redblack_ Btrees — Part 1
40 MCQs
Practice →
Advanced Trees _Avl_ Redblack_ Btrees — Part 2
40 MCQs
Practice →
Applications Of Data Structures — Part 1
40 MCQs
Practice →