Q37
MCQ2 marks, −0.67ProgrammingConsider 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 ?
Sign in to save attempts.
Keys: A–D or 1–4 choose, Enter checks, ← → move between questions.
Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.