Case-Based Critical Thinking QuestionsCase 1: XYZ SolutionsYou have just started working for XYZ Solutions as a programmer. Your first assignment is to review and correct various code so that you can become familiar with the company's programs.
You changed the Do clause to the correct For clause in the previous problem. You also changed the Loop keyword to the Next keyword for the For...Next loop. What else needs to be changed about the Do loop?
A. The statement before the loop declaring the counter variable needs to be removed.
B. The statement within the loop incrementing the counter variable needs to be removed.
C. You need to add a step value to the For clause because the default step value is 0.
D. a and b
Answer: D
You might also like to view...
When using __________ access, access to the data starts at the beginning of the file and proceeds through all the records to the end of the file.
a. direct b. sequential c. reading d. writing
Suppose we have the following definition:
vector
Label the elements of three-by-five two-dimensional array sales to indicate the order in which they’re set to zero by the following program segment:
``` for (int row = 0; row < sales.length; row++) { for (int col = 0; col < sales[row].length; col++) { sales[row][col] = 0; } } ```
The stream manipulator ____ displays Boolean values as true and false rather than 1 and 0.
a. booltext b. bool c. boolalpha d. showbool