Limited access

Upgrade to access all content for this subject

Consider the following code segment.

 //First Loop
 for (int count = first; count <= second; count++)
  makeMove();

 //Second Loop
 count = first;
 while (count < second)
 {
  makeMove();
  count++;
 }

For which values of first and second are the following two loops equivalent?

A

For all values.

B

Only if first >= second.

C

Only if first > second.

D

Only if first = second.

E

Only if first<second.

Select an assignment template