0% found this document useful (0 votes)
68 views2 pages

InfixToPostfix

This document outlines a C++ program assignment to convert infix expressions to postfix and evaluate the postfix expression using a stack. The assignment involves writing algorithms and a flowchart to convert single-character operands and operator expressions from infix to postfix notation and then evaluate the postfix expression using stack operations. Some key aspects covered are the basics of stacks, infix to postfix conversion through examples, and a question bank on related concepts like stack operations, expression notations, and expression evaluations.

Uploaded by

shivali.mali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views2 pages

InfixToPostfix

This document outlines a C++ program assignment to convert infix expressions to postfix and evaluate the postfix expression using a stack. The assignment involves writing algorithms and a flowchart to convert single-character operands and operator expressions from infix to postfix notation and then evaluate the postfix expression using stack operations. Some key aspects covered are the basics of stacks, infix to postfix conversion through examples, and a question bank on related concepts like stack operations, expression notations, and expression evaluations.

Uploaded by

shivali.mali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Data Structure and Lab (DSL) SE Computer Engineering

Practical No:12(D)
Practical Title: Write a C++ program for expression conversion as infix to postfix and its
evaluation using stack
Aim: Implement C++ program for expression conversion as infix to postfix and its evaluation
using stack based on given conditions
i. Operands and operator, both must be single character.
ii. Input Postfix expression must be in a desired format.
iii. Only '+', '-', '*' and '/ ' operators are expected

Pre-requisite:
• Basics of stack.
• Different operations that can be performed on stack

Objective:
• To convert the expression from infix to postfix
• Evaluate the expression

Input:
Infix expression

Outcome:
• Equivalent postfix expression
• Result of evaluation of an expression.

Theory :

- Write short theory for stack.


- Explain infix to postfix expression
- Example infix to postfix conversion

Algorithms :
Write your own algorithms

Flowchart :
Draw flowchart for above algorithms

Conclusion:
By this way, we can perform expression conversion as infix to postfix and its evaluation using stack
A P J Total
Dated Sign
3 4 3 10

Pune Vidyarthi Griha’s College of Engineering, nashik. Prof. Anand N. Gharu


Data Structure and Lab (DSL) SE Computer Engineering

Question Bank:
1. What is Stack?
2. Which are the different operations that can be performed on stack?
3. Explain PUSH, POP operations on stack
4. What are the applications of stack?
5. What is infix, postfix and prefix expression?
6. Conversion – infix to postfix, infix to prefix , etc.
7. Evaluation of infix, postfix and prefix expression

Pune Vidyarthi Griha’s College of Engineering, nashik. Prof. Anand N. Gharu

You might also like