Answer the following statements true (T) or false (F)
1. The update expression of a for loop can contain more than one statement, for example:
for(i = 5; i <= 10; i++, total+= sales)
2. Multiple relational expressions cannot be placed into the test condition of a for loop.
3. You may nest while and do-while loops but you may not nest for loops.
4. You may not use the break statement in a nested loop.
1. T
2. T
3. F
4. F
You might also like to view...
MC When the programmer knows how many times a loop will execute in advance, a______ loop should be used.
a) sentinel. b) infinite. c) counter-controlled. d) None of the above.
Many configuration files contain many comments, including commented- out default configuration directives. Write a program to remove these com- ments from a configuration file.
What will be an ideal response?
What is the complexity of the following code?
int i, j, k = 0; for (i = n / 2; i <= n; i++) { for (j = 2; j <= n; j = j * 2) { k = k + n / 2; } } a. O(nlog(n)) b. O(n) c. O(n^2) d. O(2^n)
Under what registry hive would an investigator find a list of MRU files?