Discussion
The expression (a + b) * (c - d) is translated into three address code with one operator per instruction. How many instructions are produced?
Answer: B
With one operator per instruction, the instruction count equals the operator count. The expression \( (a+b)*(c-d) \) contains three operators, so \[ n = 3 \] namely \( t_1 = a + b \), \( t_2 = c - d \), and \( t_3 = t_1 * t_2 \). Three temporaries are introduced, the last holding the value of the whole expression.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development