Consider the following program fragment i = 6720; j = 4; while (i % j) { i = i / j; j = j + 1; } On termination j will have the value
- A. 4
- B. 8
- C. 9
- D. 6720
Answer: A. 4
Explanation: 6720 is divisible by 4. Loop condition 0. Loop never runs.
All ISRO Computer Science (CSE) papers | ISRO Computer Science (CSE) 2015
Consider the following program fragment i = 6720; j = 4; while (i % j) { i = i / j; j = j + 1; } On termination j will have the value
Answer: A. 4
Explanation: 6720 is divisible by 4. Loop condition 0. Loop never runs.
Previous question | Next question | All questions of ISRO Computer Science (CSE) 2015