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.
The following code is not working properly. The message should display four times. What needs to be changed for the code to work properly?
?
Do While intCounter < 5
     MessageBox.Show("OK")
     intCounter = intCounter + 1
Loop

A. intCounter < 5 should be changed to intCounter = 5
B. intCounter < 5 should be changed to intCounter > 5
C. intCounter = 1 should be added before the Do statement
D. intCounter = 0 should be added before the Do statement


Answer: C

Computer Science & Information Technology

You might also like to view...

What is leading? What is its purpose? Explain “set solid” in terms of leading. Is set solid a good choice for body text on a Web page? Why or why not?

What will be an ideal response?

Computer Science & Information Technology

To modify a slide background, you click Format Background in the Customize group on the DESIGN tab

Indicate whether the statement is true or false

Computer Science & Information Technology

Give an example of a built-in function

What will be an ideal response?

Computer Science & Information Technology

By default, PivotTables display aggregated data for each category

Indicate whether the statement is true or false

Computer Science & Information Technology