Quiz Space

Introduction to C Programming · Qualifier · 16 Mar 2025 · January 2025 term

Question 14: Consider the below steps of computations.\ R[0] = 9\ R[1…

Question 14

+4 marksNumerical answer

Consider the below steps of computations.
1. R[0] = 9
2. R[1] = 0
3. R[1] = R[1] + R[0]
4. R[0] = R[0] - 2
5. If R[0] > 0, go to step-3, otherwise go to step-6
6. R[2] = R[1]
What will be the values of R[2] at the end of the computations?

Show answer

Correct answer: 25

Question 14 of 16 in the IIT Madras BS Introduction to C Programming (Intro to C Programming) Qualifier paper sat on 16 Mar 2025, in the January 2025 term (IIT M ES QUALIFIER AN EXAM QEQ1 16 Mar 2025). It carries 4 marks.

More questions from this paper

  1. Q1What does the term "ROM" stand for in computer memory architecture?
  2. Q2Which of the following is used to terminate a C statement?
  3. Q3Consider the computations given below using the generalized memory model.\ M[0] ← x\ M[1] ← y\ M[2] ← M[0] – M[1]\ M[1]…
  4. Q4The 8-bit binary representation of decimal number -39 in 2's complement notation is .
  5. Q5Consider the following code. Let the input is a positive integer in the given program. What does the code do?
  6. Q6Find the decimal equivalent for the unsigned binary representation (11101110)2.
  7. Q7How many maximum unique characters can be encoded using 7 bits?
  8. Q8Consider a decimal number 201. What is the 8 bit binary value of it?
  9. Q9Figure question
  10. Q10Which of the following is the correct syntax for a switch statement in C?
  11. Q11Consider the below C program. What will be the output of the above program?
  12. Q12Which of the following is/are the component(s) of a computer CPU?
  13. Q13Which of the following is/are valid identifier(s) in C?
  14. Q15Consider the following code snippet. How many times will Hello C be printed?
  15. Q16Figure question