How many times does each of the following loops execute? Assume that i is not changed in the loop body.

i. for (i = -10; i <= 10; i++)
ii. for (i = 10; i >= 0; i++)
iii. for (i = -10; i <= 10; i = i + 3)
iv. for (i = -10; i <= 10; i = i + 2)


i. 21
ii. infinite loop
iii. 7
iv. 11

Computer Science & Information Technology

You might also like to view...

Breaking a program up into a set of manageable sized functions is called ________ programming.

A) functional B) modular C) divisible D) high-level E) low-level

Computer Science & Information Technology

________ is a system tool that clears the hard drive of all unwanted files such as temporary Internet files or files in the Recycle Bin

Fill in the blank(s) with correct word

Computer Science & Information Technology

________ are characteristics that determine the appearance, structure, and behavior of an object

A) Fields B) Properties C) Functions D) Headers

Computer Science & Information Technology

Certificates are stored in certificate stores, which are located in a protected area of the Registry on all server and client computers

Indicate whether the statement is true or false

Computer Science & Information Technology