SlideShare a Scribd company logo
1 of 1
Download to read offline
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

What's hot

Conversion from infix to prefix using stack
Conversion from infix to prefix using stackConversion from infix to prefix using stack
Conversion from infix to prefix using stack
Haqnawaz Ch
 

What's hot (20)

Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)
 
Data mining primitives
Data mining primitivesData mining primitives
Data mining primitives
 
Presentation on Elementary data structures
Presentation on Elementary data structuresPresentation on Elementary data structures
Presentation on Elementary data structures
 
Lecture 10 semantic analysis 01
Lecture 10 semantic analysis 01Lecture 10 semantic analysis 01
Lecture 10 semantic analysis 01
 
Hashing
HashingHashing
Hashing
 
Infix to Postfix Conversion Using Stack
Infix to Postfix Conversion Using StackInfix to Postfix Conversion Using Stack
Infix to Postfix Conversion Using Stack
 
Code Generation
Code GenerationCode Generation
Code Generation
 
Query optimization in SQL
Query optimization in SQLQuery optimization in SQL
Query optimization in SQL
 
Expression evaluation
Expression evaluationExpression evaluation
Expression evaluation
 
String function in my sql
String function in my sqlString function in my sql
String function in my sql
 
CS8391 Data Structures 2 mark Questions - Anna University Questions
CS8391 Data Structures 2 mark Questions - Anna University QuestionsCS8391 Data Structures 2 mark Questions - Anna University Questions
CS8391 Data Structures 2 mark Questions - Anna University Questions
 
Reading Data into R
Reading Data into RReading Data into R
Reading Data into R
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
 
Conversion from infix to prefix using stack
Conversion from infix to prefix using stackConversion from infix to prefix using stack
Conversion from infix to prefix using stack
 
Binary expression tree
Binary expression treeBinary expression tree
Binary expression tree
 
Infix prefix postfix
Infix prefix postfixInfix prefix postfix
Infix prefix postfix
 
Prefix, Infix and Post-fix Notations
Prefix, Infix and Post-fix NotationsPrefix, Infix and Post-fix Notations
Prefix, Infix and Post-fix Notations
 
Intro to Discrete Mathematics
Intro to Discrete MathematicsIntro to Discrete Mathematics
Intro to Discrete Mathematics
 
The role of the parser and Error recovery strategies ppt in compiler design
The role of the parser and Error recovery strategies ppt in compiler designThe role of the parser and Error recovery strategies ppt in compiler design
The role of the parser and Error recovery strategies ppt in compiler design
 
Packages - PL/SQL
Packages - PL/SQLPackages - PL/SQL
Packages - PL/SQL
 

Viewers also liked (6)

Conversion of Infix To Postfix Expressions
Conversion of Infix To Postfix Expressions Conversion of Infix To Postfix Expressions
Conversion of Infix To Postfix Expressions
 
Infix to Prefix (Conversion, Evaluation, Code)
Infix to Prefix (Conversion, Evaluation, Code)Infix to Prefix (Conversion, Evaluation, Code)
Infix to Prefix (Conversion, Evaluation, Code)
 
Infix-Postfix expression conversion
Infix-Postfix expression conversionInfix-Postfix expression conversion
Infix-Postfix expression conversion
 
Infix to postfix
Infix to postfixInfix to postfix
Infix to postfix
 
My lecture infix-to-postfix
My lecture infix-to-postfixMy lecture infix-to-postfix
My lecture infix-to-postfix
 
Infix to postfix conversion
Infix to postfix conversionInfix to postfix conversion
Infix to postfix conversion
 

More from Syed Mustafa

More from Syed Mustafa (20)

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

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^+ 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+