This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Answers to part B of "Test Problems - Basic Programming Terms" 1. What is a program? A program is a list of instructions that tells the computer exactly what to do. 2. What is code? Code is a program. 3. If you misspell a Visual Basic command, what kind of error have you violated? You've just put a syntax error in the program. 4. What is a variable? A named storage location in memory. 5. What statement defines variables? The Dim statement. 6. What is a data type? A data type is a category of data that all Visual Basic values fall into. 7. Which data type always has decimal places, Single or Integer? Single 8. True or false: Variables can stay the same throughout a program. True; variables can change but they do not have to. 9. True or false: The following assignment statement will assign a value of 5 to variable z: 5 = z Not true, but "Z = 5" will. 10. True or false: To swap two variables x and y within a procedure, you can use the following code: x = y y = x To swap two variables x and y within a procedure, the solution is to use a temporary variable: temp = x x = y y = temp The following does not work: x = y y = x 11. True or false: The order of evaluation of operations in arithmetic expressions is: ( ) , then * and / , then ^, and then + and . then + and ....
View Full Document
- Fall '09