CP1 - 4.02 - Variables, Data Types, And Naming Conventions Question Preview (ID: 43598)
Variables, Data Types, And Naming Conventions.
TEACHERS: click here for quick copy question ID numbers.
Why is label not a valid variable name?
a) It does not start with a number.
b) It does not have underscore as one of its characters.
c) It is a Visual Basic reserved keyword.
d) It should be at least 6 characters.
In the statement, lblMessage.Text = This is a label. What does lblMessage refer to?
a) Form object
b) Label control
c) Selected object
d) Type of event
A variable named intGrade is of what data type?
a) Integer
b) Double
c) Decimal
d) String
A variable named decBonus is of what data type?
a) Boolean
b) Double
c) Decimal
d) String
What is an appropriate name for a constant according to Hungarian notation?
a) $_RATE
b) $rate
c) decRATE
d) decRate
Which would best represent a variable that will hold a true or false value if an entry was valid?
a) Dim blnlsValid As Boolean
b) Dim dbllsValid As Double
c) Dim IsValid As Integer
d) Dim strlsValid As String
If a student needed to declare a variable to hold values representing a grade point average (GPA), which would be the best declaration given programming naming conventions?
a) Dim dblGPA As Double
b) Dim intGPA As Double
c) Dim intGPA As Integer
d) Dim strGPA As String
Which would be appropriate as a variable?
a) #HoursWorked
b) $PayRate
c) Last.Name
d) strFirstName
Which would be appropriate as an object name?
a) 9DigitZip
b) GrossPay$
c) Last.Name
d) txtHoursWorked
What is an appropriate name for a textbox according to Hungarian notation?
a) $Textbox
b) BoxName
c) MONEY_TEXT
d) txtName
A variable named blnIsTrue is of what data type?
a) Boolean
b) Double
c) Integer
d) String
According to Hungarian notation, what is an appropriate name for a Textbox?
a) 1stBoxName
b) boxName
c) TEXT_NAME
d) txtName
Which would best represent a Button control object that will be used to calculate an average?
a) binAverage
b) btnCalcAverage
c) Calculate
d) dblCalculate
A variable named strName is of what data type?
a) Integer
b) Double
c) Decimal
d) String
Which is a proper name for a button according to Hungarian notation?
a) AddButton
b) btnAdd
c) Button1
d) ButtonAdd
A variable named dblTaxRate is of what data type?
a) Integer
b) Double
c) Decimal
d) String
Which data type is appropriate to store the value 75.9?
a) Double
b) Boolean
c) Integer
d) String
Play Games with the Questions above at ReviewGameZone.com
To play games using the questions from above, visit ReviewGameZone.com and enter game ID number: 43598 in the upper right hand corner or click here.
To play games using the questions from above, visit ReviewGameZone.com and enter game ID number: 43598 in the upper right hand corner or click here.
TEACHERS / EDUCATORS
Log In | Sign Up / Register
Log In | Sign Up / Register