Question: Write a C program to generate three address code. Step 1 : Begin the program Step 2 : The expression is read from the file
Write a C program to generate three address code.
Step: Begin the program
Step : The expression is read from the file using a file pointer
Step : Each string is read and the total no of strings in the file is calculated.
Step: Each string is compared with an operator; if any operator is seen then the previous string and next string are concatenated and stored in a first temporary value and the three address code expression is printed
Step: Suppose if another operand is seen then the first temporary value is concatenated to the next string using the operator and the expression is printed.
Step: The final temporary value is replaced to the left operand value.
Step : End the program.
PROGRAM: program for three address code generation
#include
Code by use Xcode pld
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
