Three address codes can be represented in special structures known as : (A)…

2023

Three address codes can be represented in special structures known as :

(A) Quadruples

(B) Triples

(C) Patterns

(D) Indirect Triples 

Choose the correct answer from the options given below :

  1. A.

    (A) and (B) Only

  2. B.

    (A), (B) and (D) Only

  3. C.

    (B) and (C) Only

  4. D.

    (B), (C) and (D) Only

Attempted by 127 students.

Show answer & explanation

Correct answer: B

Answer: Quadruples, Triples, and Indirect Triples.

Explanation: Three-address code is commonly represented using the following structures.

  • Quadruples: Use four fields (operator, argument1, argument2, result) so each instruction explicitly stores its result.

  • Triples: Record instructions as (operator, arg1, arg2) and identify results by the instruction’s position or index rather than a separate result field.

  • Indirect Triples: Are like triples but use an indirection table (a table of pointers) to make moving or modifying code simpler.

Note: "Patterns" is not a standard storage format for three-address code; the term usually refers to matching or code-generation templates rather than the representation of TAC.

Explore the full course: Mppsc Assistant Professor