SCTR’s PUNE INSTITUTE OF COMPUTER
TECHNOLOGY
PUNE - 411043
Department of Electronics & Telecommunication
Engineering
ASSESMENT YEAR: 2025-2026 CLASS: SY 7
SUBJECT: DATA STRUCTURES AND ALGORITHMS
EXPT No: 03 LAB Ref: SY/2025-26/ Starting date:
Roll No: 22367 Submission date:
Exp.-3: STL-Based Data Structures and Infix Expression
Title:
Evaluation in C++
Design and implement a function in C++ to evaluate an infix expression directly,
without
converting it to postfix. The function should correctly handle:
Problem 1. Spaces
Statement 2. Parentheses ()
3. Operator precedence (+, -, *, /)
4. Associativity (left-to-right for +, -, *, /)
Refer lab manual for below
Prerequisites: Strong knowledge of C++ stacks (<stack> from STL).
Understanding of infix expressions, operator precedence, and
associativity.
Familiarity with parsing strings in C++.
Basic mathematical expression evaluation logic.
Objectives: To design a function that evaluates an infix expression without
converting it to postfix.
To implement operator precedence, associativity, and parentheses
handling.
To improve understanding of stack-based expression evaluation in C++.
Theory:
Write algorithm and besides it example for each, attach both side ruled
pages in case required
P: f-LTL-UG/03/R1 Page 1 of 2
ERRORS List if any
REMEDY (if any)
CONCLUSION:
[1] T1. M. Goodrich, R. Tamassia, and D. Mount, Data Structures and Algorithms
in C++
[2] Y. Langsam, M. J. Augenstein, Data Structures Using C and C++
Continuous Assessment for DS AY: 2025-26
RPP (5) SPO (5) Total (10) Signature:
Assessed By:
Start date Submission date Date:
*Regularity, Punctuality, performance
*Submission, Presentation, orals
P: f-LTL-UG/03/R1 Page 2 of 2