Is it right for equation 3 & 4?

The Gateway to Computer Science Excellence

+2 votes

1. a=b[i]+c[j]

Quadruples

Operator | Argument1 | Argument2 | Result | |

0 | =[] | b | i | t1 |

1 | =[] | c | j | t2 |

2 | + | t1 | t2 | t3 |

3 | = | t3 | a |

Triples

Operator | Argument1 | Argument2 | |

0 | =[] | b | i |

1 | =[] | c | j |

2 | + | (0) | (1) |

3 | = | a | (2) |

Indirect Triples

0 | (0) |

1 | (1) |

2 | (2) |

3 | (3) |

2. a[i]=b∗c−b∗d

Quadruples

Operator | Argument1 | Argument2 | Result | |

0 | * | b | c | t1 |

1 | * | b | d | t2 |

2 | - | t1 | t2 | t3 |

3 | []= | a | i | t4 |

4 | = | t3 | t4 |

Triples

Operator | Argument1 | Argument2 | |

0 | * | b | c |

1 | * | b | d |

2 | - | (0) | (1) |

3 | []= | a | i |

4 | = | (3) | (2) |

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.3k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.1k
- Non GATE 1.5k
- Others 1.5k
- Admissions 595
- Exam Queries 576
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 17

50,645 questions

56,616 answers

195,897 comments

102,352 users