For Next Trace Table 1
For Next Trace Table 1
For Next Trace Table 1
Computer Science (Visual Basic) CODE REVIEW ForNextTraceTable1 0001 Aaron Baxter
This program displays the value of Index during the execution of a FOR NEXT loop.
1 Name one important comment that is missing from this program. [1]
..............................................................................................................................................................................................................
2 Where is a good place to declare the variables in a program and explain why? [2]
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
ForNextTraceTable1
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
0001 Aaron Baxter Page 2 of 4
7 What text will this line of code display on the screen? i.e., what is the value of Index at the end of the
FOR NEXT loop [2]
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
10 What is the purpose of the symbol & in Visual Basic. Carefully write out what would be displayed on the screen
at line 11.? [3]
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
11 It is not possible to use words like “Integer” or “For” as variable identifiers in Visual Basic why is this? [2]
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
0001 Aaron Baxter Page 3 of 4
12 Visual Studio 2019 can be used to find a bug in your programming code. What do you need to mark in your
code so that the program will stop during execution (running) and allow you to watch the variables and run the
program one line at a time? [1]
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
13 Give at least two reasons why you might trace a piece of code that you have not seen before? [4]
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
..............................................................................................................................................................................................................
0001 Aaron Baxter Page 4 of 4