SlideShare a Scribd company logo
10CS35-Data Structure with C 
Assignment on Infix to Prefix, Postfix Conversion 
Prof. A. Syed Mustafa, HKBKCE, Bangalore 
S.No 
Infix Expression 
Prefix Expression 
Postfix/Suffix Expression 
1. 
(B^2-4*A*C)^(1/2) 
^-^B2-**4AC/12 
B2^4A*C*-12/^ 
2. 
(A+B-C)*(E/F)-(G-H/I) 
-*++ABC/EF/-GHI 
AB+C-EF/*GHI/-- 
3. 
((A/(B-C+D))*(E-A)*C) 
**/A+-BCD-EAC 
ABC-D+/EA-*C* 
4. 
(3*4^6+(2*(5/6)^8)) 
+*3^46^*2/568 
346^*256/8^*+ 
5. 
((P%Q)/A*B^C)+(R-S%U)+W^Z 
++/%PQ*A^BC-R%SU^WZ 
PQ%A/BC^*RSU%-+WZ^+ 
6. 
1-4^3+7*(9^1/5)-2 
-+-1^43*7^9/152 
143^-791^5/*+2- 
7. 
((3*4)^6+2*(5/6)^8) 
+^*346^2^/568 
34*6^256/8^*+ 
8. 
(P%Q)/A*B^C+(R-S%U)+W^Z 
++*/%PQA^BC-R%SU^WZ 
PQ%A/BC^*RSU%-+WZ^+ 
9. 
1-4^3+7*(9^1/5)-2 
-+-1^43*7/^9152 
143^-791^5/*+2- 
10. 
(M*N)-X^Y^Z*(A+B-C/P*Q^R)/D 
-*MN/*^X^YZ-+AB*/CP^QRD 
MN*XY^Z^AB+CP/QR^*-*D/- 
11. 
((A^B)^C^M*W/X)^Y^Z 
^/*^^AB^CMWX^YZ 
AB^C^M^W*X/Y^Z^ 
12. 
A/B^C+D*E–A*C 
-+/A^BC*DE*AC 
ABC^/DE*+AC*- 
13. 
A^C+D-E*(X^Y*Z) 
-+^ACD*E*^XYZ 
AC^D+EXY^Z**- 
14. 
(A%D)^C*E+X-Y*(A^B) 
-+*^%ADCEX*Y^AB 
AD%C^E*X+YAB^*- 
15. 
A+B-(C*D^E)*X+Y 
+-+AB**C^DEXY 
AB+CDE^*X*-Y+ 
16. 
((A^B*C)^I*(D-Z)/M+N) 
+/*^*^ABCI-DZMN 
AB^C*I^DZ-*M/N+ 
17. 
A*B+C^D 
+*AB^CD 
AB*CD^+ 
18. 
A^C-D*E 
-^AC*DE 
AC^DE*- 
19. 
A+(C^D+E) 
+A+^CDE 
ACD^E++ 
20. 
A*(B+C)/D 
/*A+BCD 
ABC+*D/ 
21. 
A*B+(C-D/E) 
+*AB-C/DE 
AB*CDE/-+ 
22. 
A*(B+C)/D-G 
-/*A+BCDG 
ABC+*D/G- 
23. 
((A/D+C)*(X^Y)) 
*+/ADC^XY 
AD/C+XY^* 
24. 
A+B*C-D 
-+A*BCD 
ABC*+D- 
25. 
A*B-C+D 
+-*ABCD 
AB*C-D+

More Related Content

PDF
Infix to Prefix (Conversion, Evaluation, Code)
PPTX
Android activity lifecycle
PPTX
Java constructors
PPTX
Introduction to Java -unit-1
PPTX
Classes in c++ (OOP Presentation)
PPTX
Parsing in Compiler Design
PDF
Methods in Java
PDF
Memory Management C++ (Peeling operator new() and delete())
Infix to Prefix (Conversion, Evaluation, Code)
Android activity lifecycle
Java constructors
Introduction to Java -unit-1
Classes in c++ (OOP Presentation)
Parsing in Compiler Design
Methods in Java
Memory Management C++ (Peeling operator new() and delete())

What's hot (20)

PPT
C++ Pointers And References
PPTX
Object Oriented Programming
PPTX
Distributed Systems
PPT
Collection Framework in java
PPTX
Pointers in c++
PPTX
Constructor in java
PPTX
Introduction to Array ppt
PPTX
Constructor ppt
PPTX
Constructor in java
PDF
14-Intermediate code generation - Variants of Syntax trees - Three Address Co...
PPTX
Function overloading
PPTX
Code generation
PPT
structure and union
PPTX
OOP Introduction with java programming language
PPTX
Theory of computation Lec7 pda
DOC
Time and space complexity
PDF
PPT
JAVA OOP
PPT
C++ classes tutorials
C++ Pointers And References
Object Oriented Programming
Distributed Systems
Collection Framework in java
Pointers in c++
Constructor in java
Introduction to Array ppt
Constructor ppt
Constructor in java
14-Intermediate code generation - Variants of Syntax trees - Three Address Co...
Function overloading
Code generation
structure and union
OOP Introduction with java programming language
Theory of computation Lec7 pda
Time and space complexity
JAVA OOP
C++ classes tutorials
Ad

Viewers also liked (8)

DOC
Infix to-postfix examples
PPT
Conversion of Infix To Postfix Expressions
PPT
Expression evaluation
PPTX
Infix-Postfix expression conversion
DOCX
Conversion from infix to prefix using stack
PPTX
Infix to postfix
PPTX
My lecture infix-to-postfix
PPTX
Infix to postfix conversion
Infix to-postfix examples
Conversion of Infix To Postfix Expressions
Expression evaluation
Infix-Postfix expression conversion
Conversion from infix to prefix using stack
Infix to postfix
My lecture infix-to-postfix
Infix to postfix conversion
Ad

More from Syed Mustafa (20)

PDF
BPOPS203 PRINCIPLES OF PROGRAMMING USING C LAB Manual.pdf
PDF
18CSL58 DBMS LAB Manual.pdf
PDF
Syed IoT - module 5
PDF
IoT - module 4
PDF
15CS81- IoT- VTU- module 3
PDF
15CS81- IoT Module-2
PDF
Internet of Things - module 1
PDF
15CS664- Python Application Programming- Question bank 1
PDF
15CS664- Python Application Programming VTU syllabus
PDF
15CS664- Python Application Programming - Module 3
PDF
15CS664-Python Application Programming - Module 3 and 4
PDF
15CS664 Python Question Bank-3
PDF
Data structures lab manual
PDF
Usp notes unit6-8
PDF
Grid computing notes
PDF
Unix system programming
PDF
answer-model-qp-15-pcd13pcd
PDF
VTU PCD Model Question Paper - Programming in C
PDF
Pointers and call by value, reference, address in C
PDF
Data structures lab c programs
BPOPS203 PRINCIPLES OF PROGRAMMING USING C LAB Manual.pdf
18CSL58 DBMS LAB Manual.pdf
Syed IoT - module 5
IoT - module 4
15CS81- IoT- VTU- module 3
15CS81- IoT Module-2
Internet of Things - module 1
15CS664- Python Application Programming- Question bank 1
15CS664- Python Application Programming VTU syllabus
15CS664- Python Application Programming - Module 3
15CS664-Python Application Programming - Module 3 and 4
15CS664 Python Question Bank-3
Data structures lab manual
Usp notes unit6-8
Grid computing notes
Unix system programming
answer-model-qp-15-pcd13pcd
VTU PCD Model Question Paper - Programming in C
Pointers and call by value, reference, address in C
Data structures lab c programs

Recently uploaded (6)

PDF
فێرکردن و فێربوونی مۆدێرن.pdf دەروازەیەک بۆ
PDF
ಶ್ರೀ ಕ್ಷೇತ್ರ ಚಂಪಕಧಾಮ ಸ್ವಾಮಿ ದೇವಾಲಯSri Kshetra Champakadham Swamy Temple
PPTX
Slide Ibadah siang 29 mei 2025 jika .pptx
PPTX
Coklat Beige Ilustrasi 3 Dimensi Tugas Kelompok Presentasi.pptx
PDF
"ಶ್ರೀ ಕ್ಷೇತ್ರ ಚಂಪಕಧಾಮ ಸ್ವಾಮಿ ದೇವಾಲಯ""Sri Kshetra Champakadham Swamy Temple"
PPTX
PETA.pptx,a,amamamamamamamamamammamamamam
فێرکردن و فێربوونی مۆدێرن.pdf دەروازەیەک بۆ
ಶ್ರೀ ಕ್ಷೇತ್ರ ಚಂಪಕಧಾಮ ಸ್ವಾಮಿ ದೇವಾಲಯSri Kshetra Champakadham Swamy Temple
Slide Ibadah siang 29 mei 2025 jika .pptx
Coklat Beige Ilustrasi 3 Dimensi Tugas Kelompok Presentasi.pptx
"ಶ್ರೀ ಕ್ಷೇತ್ರ ಚಂಪಕಧಾಮ ಸ್ವಾಮಿ ದೇವಾಲಯ""Sri Kshetra Champakadham Swamy Temple"
PETA.pptx,a,amamamamamamamamamammamamamam

Infix prefix postfix expression -conversion

  • 1. 10CS35-Data Structure with C Assignment on Infix to Prefix, Postfix Conversion Prof. A. Syed Mustafa, HKBKCE, Bangalore S.No Infix Expression Prefix Expression Postfix/Suffix Expression 1. (B^2-4*A*C)^(1/2) ^-^B2-**4AC/12 B2^4A*C*-12/^ 2. (A+B-C)*(E/F)-(G-H/I) -*++ABC/EF/-GHI AB+C-EF/*GHI/-- 3. ((A/(B-C+D))*(E-A)*C) **/A+-BCD-EAC ABC-D+/EA-*C* 4. (3*4^6+(2*(5/6)^8)) +*3^46^*2/568 346^*256/8^*+ 5. ((P%Q)/A*B^C)+(R-S%U)+W^Z ++/%PQ*A^BC-R%SU^WZ PQ%A/BC^*RSU%-+WZ^+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