BIS 311 DeVry Week 2 Quiz

Published on May 2017 | Categories: School Work | Downloads: 44 | Comments: 0 | Views: 795
Download PDF   Embed   Report

BIS 311 DeVry Week 2 Quiz BIS311 BIS 311 DeVry Week 2 Quiz Question 1.1. (TCO 3) Every variable has a _____, name, scope, and lifetime. (Points : 1) o property o data type o dimension o parameter list Question 2.2. (TCO 3) The data type of a variable determines _____. (Points : 1) o the identifier used to refer to the variable in the code o the part of the code in which the variable can be used o the time when the variable is created and destroyed o the category of data the variable can store Question 3.3. (TCO 3) A variable that can hold only a single Unicode character has a data type of _____. (Points : 1) o String o Short o Single o Char Question 4.4. (TCO 3) To avoid rounding errors in financial calculations, the best data type to use for money amounts is _____. (Points : 1) o Single o Double o Decimal o Long Question 5.5. (TCO 3) It is best to avoid the Object data type unless absolutely necessary because _____. (Points : 1) o it is not supported by all versions of Visual Basic o your application may not work in future versions of Windows o it can cause an application to run more slowly o only numeric values can be stored in Object variables Question 6.6. (TCO 3) In Hungarian notation, variable names begin with a three-character prefix that indicates _____. (Points : 1) o whether the variable is an input or an output o the initials of the programmer o the variable’s scope o the variable’s data type Question 7.7. (TCO 3) When a variable name is written in camel case, upper-case letters _____. (Points : 1) o are not used o are used for the first letter of each word only o are used for all letters in the name o are used for only the prefix Question 8.8. (TCO 3) Which of the following is a valid variable name in Visual Basic? (Points : 1) o decSales4Q2015 o 4Q2015Sales o Sales for Fourth Quarter 2015 o dec.Sales.4Q.2015 Question 9.9. (TCO 3) Which of the following statements declares a variable named dblHeight with data type Double in Visual Basic? (Points : 1) o Dim dblHeight As Double o Dim Double As dblHeight o Double dblHeight o Declare dblHeight As Double Question 10.10. (TCO 3) If a variable with a data type of Boolean is declared without specifying an initial value, its initial value will be _____. (Points : 1) o true o false o undefined o nothing Question 11.11. (TCO 3) A value can be stored in a variable while the application is running using a(n) _____ statement. (Points : 1) o conditional o assignment o control o comment Question 12.12. (TCO 3) To convert text input to a number, most programmers prefer to use the TryParse method rather than the Val function because _____. (Points : 1) o TryParse executes faster o TryParse allows the programmer to specify the intended data type o TryParse uses less memory o TryParse can convert a string that contains a dollar sign Question 13.13. (TCO 3) A memory location in an application that can be referred to by name, but whose value cannot be changed after it has been initialized, is a _____. (Points : 1) o literal constant o named constant o static variable o class-level variable Question 14.14. (TCO 3) Which of the following statements tells Visual Basic to ensure that every named constant and variable is declared with a data type? (Points : 1) o Option Infer On o Option Infer Off o Option Strict On o Option Explicit Off Question 15.15. (TCO 3) The operator to join or concatenate strings in Visual Basic is the _____. (Points : 1) o percent (%) o ampersand (&) o backslash () o pipe (|) Question 16.16. (TCO 3) A control’s _____ event occurs when a change is made to the control’s Text property. (Points : 1) o Click o Enter o GotFocus o TextChanged Question 17.17. (TCO 3) What type of error is represented in the following Visual Basic statement? Die strName As String (Points : 1) o run time o functional o syntax o logic Question 18.18. (TCO 3) Which of the following would be most likely to cause a logic error in an application? (Points : 1) o Misspelling the name of a text box when referring to it in code o Entering a statement to display a result before the statement that calculates the result o Misspelling the data type in a variable declaration o Attempting to divide by zero in a calculation Question 19.19. (TCO 3) Setting a(n) _____ allows the programmer to pause execution of the application at a specific line in the code. (Points : 1) o trigger o interrupt o milestone o breakpoint Question 20.20. (TCO 3) The Visual Basic function that calculates the present value of a series of payments is (Points : 1) o PV. o FV. o Pmt. o PresVal.

Comments

Content

BIS 311 DeVry Week 2 Quiz BIS311 BIS 311 DeVry Week 2 Quiz Question 1.1. (TCO 3) Every variable has a _____, name, scope, and lifetime. (Points : 1) o property o data type o dimension o parameter list Question 2.2. (TCO 3) The data type of a variable determines _____. (Points : 1) o the identifier used to refer to the variable in the code o the part of the code in which the variable can be used o the time when the variable is created and destroyed o the category of data the variable can store Question 3.3. (TCO 3) A variable that can hold only a single Unicode character has a data type of _____. (Points : 1) o String o Short o Single o Char Question 4.4. (TCO 3) To avoid rounding errors in financial calculations, the best data type to use for money amounts is _____. (Points : 1) o Single o Double o Decimal o Long Question 5.5. (TCO 3) It is best to avoid the Object data type unless absolutely necessary because _____. (Points : 1) o it is not supported by all versions of Visual Basic o your application may not work in future versions of Windows o it can cause an application to run more slowly o only numeric values can be stored in Object variables Question 6.6. (TCO 3) In Hungarian notation, variable names begin with a three-character prefix that indicates _____. (Points : 1) o whether the variable is an input or an output o the initials of the programmer o the variable’s scope o the variable’s data type Question 7.7. (TCO 3) When a variable name is written in camel case, upper-case letters _____. (Points : 1) o are not used o are used for the first letter of each word only o are used for all letters in the name o are used for only the prefix Question 8.8. (TCO 3) Which of the following is a valid variable name in Visual Basic? (Points : 1) o decSales4Q2015 o 4Q2015Sales o Sales for Fourth Quarter 2015 o dec.Sales.4Q.2015 Question 9.9. (TCO 3) Which of the following statements declares a variable named dblHeight with data type Double in Visual Basic? (Points : 1) o Dim dblHeight As Double o Dim Double As dblHeight o Double dblHeight o Declare dblHeight As Double Question 10.10. (TCO 3) If a variable with a data type of Boolean is declared without specifying an initial value, its initial value will be _____. (Points : 1) o true o false o undefined o nothing Question 11.11. (TCO 3) A value can be stored in a variable while the application is running using a(n) _____ statement. (Points : 1) o conditional o assignment o control o comment Question 12.12. (TCO 3) To convert text input to a number, most programmers prefer to use the TryParse method rather than the Val function because _____. (Points : 1) o TryParse executes faster o TryParse allows the programmer to specify the intended data type o TryParse uses less memory o TryParse can convert a string that contains a dollar sign Question 13.13. (TCO 3) A memory location in an application that can be referred to by name, but whose value cannot be changed after it has been initialized, is a _____. (Points : 1) o literal constant o named constant o static variable o class-level variable Question 14.14. (TCO 3) Which of the following statements tells Visual Basic to ensure that every named constant and variable is declared with a data type? (Points : 1) o Option Infer On o Option Infer Off o Option Strict On o Option Explicit Off Question 15.15. (TCO 3) The operator to join or concatenate strings in Visual Basic is the _____. (Points : 1) o percent (%) o ampersand (&) o backslash () o pipe (|) Question 16.16. (TCO 3) A control’s _____ event occurs when a change is made to the control’s Text property. (Points : 1) o Click o Enter o GotFocus o TextChanged Question 17.17. (TCO 3) What type of error is represented in the following Visual Basic statement? Die strName As String (Points : 1) o run time o functional o syntax o logic Question 18.18. (TCO 3) Which of the following would be most likely to cause a logic error in an application? (Points : 1) o Misspelling the name of a text box when referring to it in code o Entering a statement to display a result before the statement that calculates the result o Misspelling the data type in a variable declaration o Attempting to divide by zero in a calculation Question 19.19. (TCO 3) Setting a(n) _____ allows the programmer to pause execution of the application at a specific line in the code. (Points : 1) o trigger o interrupt o milestone o breakpoint Question 20.20. (TCO 3) The Visual Basic function that calculates the present value of a series of payments is (Points : 1) o PV. o FV. o Pmt. o PresVal.

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close