Refer to the given 3-address code sequence. This code sequence is split into…

GATE · 2025 · CS · Set 1 · Computer Science & IT

Refer to the given 3-address code sequence. This code sequence is split into basic blocks. The number of basic blocks is ________. (Answer in integer)

1001:i=11002:j=11003:t1=10⋅i1004:t2=t1+j1005:t3=8⋅t21006:t4=t3−881007:a[t4]=0.01008:j=j+11009:if j≤10 goto 10031010:i=i+11011:if i≤10 goto 10021012:i=11013:t5=i−11014:t6=88⋅t51015:a[t6]=1.01016:i=i+11017:if i≤10 goto 1013\begin{aligned} &1001: \quad i = 1 \\ &1002: \quad j = 1 \\ &1003: \quad t1 = 10 \cdot i \\ &1004: \quad t2 = t1 + j \\ &1005: \quad t3 = 8 \cdot t2 \\ &1006: \quad t4 = t3 - 88 \\ &1007: \quad a[t4] = 0.0 \\ &1008: \quad j = j + 1 \\ &1009: \quad \text{if } j \leq 10 \text{ goto } 1003 \\ &1010: \quad i = i + 1 \\ &1011: \quad \text{if } i \leq 10 \text{ goto } 1002 \\ &1012: \quad i = 1 \\ &1013: \quad t5 = i - 1 \\ &1014: \quad t6 = 88 \cdot t5 \\ &1015: \quad a[t6] = 1.0 \\ &1016: \quad i = i + 1 \\ &1017: \quad \text{if } i \leq 10 \text{ goto } 1013 \end{aligned}

Attempted by 80 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…