Question: write c program In this project, you will implement an expression tree to evaluate given binary arithmetic expressions. Your program must read expressions from a

write c program

write c program In this project, you will implement an expression tree

In this project, you will implement an expression tree to evaluate given binary arithmetic expressions. Your program must read expressions from a file containing a single equation on each line. The equations are written as infix expressions. For each line the program should print the value resulting from evaluating the expression. Your program should support the following operations: + - * / \% ( ). White spaces or special characters are ignored. Example input: 3+5(102)1+1+1+18100/3/210083 In this case, the output should contain the following: 43 11 16 1 You should use an array implementation of your Stack library that you will use in this work. Your application should be able to show the following information through a proper menu of the application: 1. Read equations 2. Print equations 3. Evaluate using Expression tree 4. Print postfix expressions 5. Save to output file (postfix and results) 6. Exit a. There has to be adequate documentation and comments in the code (i.e., functions, loops, etc.); b. Your code should follow the code convention (i.e., spaces, indentations, etc.); and c. Your application should contain a menu to allow the user to select which option (s) he would like to run

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!