Home /
Expert Answers /
Computer Science /
c-program-to-implement-intermediate-code-generation-for-simple-arithmetic-expression-as-your-lab-pa147
(Solved):
C program to implement Intermediate Code generation for simple arithmetic expression As your lab, ...
C program to implement Intermediate Code generation for simple arithmetic expression As your lab, I would like for you write a \( \mathrm{C} \) code that scans a string that is a mathematical expression as input and generate the intermediate code for it. In particular, suppose the expression is \( \mathbf{a}=\mathbf{b} / \mathbf{c}+\mathbf{d} * \mathbf{e}-\mathbf{f}^{*} \mathbf{g}+\mathrm{h} / \mathbf{i} \) Create your code that (i) prompts the user to provide the input string (ii) Scans the input from left to right (or in any way you believe accomplishes the job) (iii) Add comments along the way to explain what the main parts of the program are doing to the string (iv) Breaks up the string into its constituent pieces to create the intermediate code