Question 19
Consider the following computation steps:
1. R[0] = 2 2. R[1] = 3 3. R[1] = R[1] + R[0] 4. R[0] = R[0] + 1 5. If R[0] ≤ 5 go to step-3, otherwise, go to step-6 6. R[2] = R[1]
What is the final value of R[2] at the end of computation?
Consider the following computation steps:
1. R[0] = 2 2. R[1] = 3 3. R[1] = R[1] + R[0] 4. R[0] = R[0] + 1 5. If R[0] ≤ 5 go to step-3, otherwise, go to step-6 6. R[2] = R[1]
What is the final value of R[2] at the end of computation?
Correct answer: 17
Question 19 of 23 in the IIT Madras BS Programming in C (Programming in C) End Term paper sat on 10 May 2026, in the January 2026 term (Programming in C 06 May 26). It carries 5 marks.