Question
Easy
Let the postfix expression 3, 2, +, 7, *, 6, 5, +, 4, *, is being evaluated using a stack. What are the values on top and bottom of stack respectively, just before second + operator is evaluated?
1
27, 5
2
11, 35
3
11, 27
4
5, 35
Question Details
Time to Solve: 12
Exam: HTET
Level/Paper: Level 3
Chapter: Data Structures (Through C++)
Topic: Stack
Correct Answer
Option D
Explanation
The correct option is (4): The evaluation of a postfix expression using a stack follows a clear LIFO (Last-In, First-Out) principle, where operands are pushed onto the stack, and operators pop the required number of operands, perform the operation, and push the result back. Following the expression $3, 2, +, 7, \*, 6, 5, +, 4, *$: First, '3' and '2' are pushed, then the first '+' is encountered, resulting…Read More
Similar Questions from HTET Exam - Level 3 - Year 2018
Question 1
Easy
Source :
HTET 2018
Intersection operation on two database relation is:
Chapter :
Database Management System (DBMS) & SQL
Topic :
Database Concepts
Question 2
Easy
Source :
HTET 2018
Let QSPTRU and PQSRTU are in-order traversal and pre-order traversal respectively for a given binary tree T. What will be the post-order traversal T?
Chapter :
Data Structures (Through C++)
Topic :
Data Structure Concepts
Question 3
Easy
Source :
HTET 2018
Consider a relation R(A, B, C). Which of the following statement is not true according to inference rules for functional dependencies ?
Chapter :
Database Management System (DBMS) & SQL
Topic :
Database Concepts
Question 4
Easy
Source :
HTET 2018
In HTML Version-5, the _______ declaration tag is used by the web browser to understand the version of the HTML:
Chapter :
Web Designing using HTML
Topic :
HTML Basics