ISRO Computer Science (CSE) 2015 - Question 71

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

  • A. 4
  • B. 8
  • C. 9
  • D. 6720

Answer: A. 4

Explanation: 6720 is divisible by 4. Loop condition 0. Loop never runs.

| | All questions of ISRO Computer Science (CSE) 2015