basic programming

basic programming - Answers to part B of"Test Problems...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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

Page1 / 4

basic programming - Answers to part B of"Test Problems...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online