Quiz Space

Programming in C · End Term · 10 May 2026 · January 2026 term

Question 19: Consider the following computation steps:\ R[0] = 2 2. R…

Question 19

+5 marksNumerical answer

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?

Show answer

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.

More questions from this paper

  1. Q1Figure question
  2. Q2Figure question
  3. Q3Consider the following C program: What will be the output?
  4. Q4Consider the code: What will be the value of c?
  5. Q5What is the correct way to access a structure member using a pointer to a structure?
  6. Q6We want to dynamically allocate memory at runtime for 10 integer elements and store the returned address in a pointer. …
  7. Q7Figure question
  8. Q8Consider the following C program: What will be the output?
  9. Q9Figure question
  10. Q10Consider the following code: What will be the output?
  11. Q11What will be the output of the given code?
  12. Q12Figure question
  13. Q13Figure question
  14. Q14Consider the C program below. What will be the output of the above C program?
  15. Q15Consider the following C program: Which of the following statements are correct?
  16. Q16Which of the following statements about arrays in C are correct?
  17. Q17Figure question
  18. Q18Which of the following file modes delete the existing content of a file when opened?
  19. Q20Consider the following C program: What will be the output printed on the screen?
  20. Q21Consider the following C program: What will be the output printed on the screen?
  21. Q22Consider the following C code: What will be the output?
  22. Q23Consider the following C code snippet. What will be the output?