Consider the C program fragment below which is meant to divide \(x\) by \(y\)…
PYQ GATE 2017
Consider the C program fragment below which is meant to divide by using repeated subtractions. The variables and are all unsigned int.
while (r >= y) { r=r-y; q=q+1; }
Which of the following conditions on the variables and before the execution of the fragment will ensure that the loop terminated in a state satisfying the condition ?
- A.
- B.
- C.
- D.
Attempted by 492 students.
Sign up free to check your answer
Sign up freeLoading lesson…

