Review Game Zone
Flash Cards
(current)
Games
Teachers
Search
CP1 - 4.02 - Variables, Data Types, And Naming Conventions
Test Description: Variables, Data Types, and Naming Conventions
Instructions: Answer all questions to get your test result.
1) Why is label not a valid variable name?
A
It should be at least 6 characters.
B
It does not have underscore as one of its characters.
C
It does not start with a number.
D
It is a Visual Basic reserved keyword.
2) In the statement, lblMessage.Text = This is a label. What does lblMessage refer to?
A
Type of event
B
Selected object
C
Form object
D
Label control
3) A variable named intGrade is of what data type?
A
Decimal
B
Integer
C
Double
D
String
4) A variable named decBonus is of what data type?
A
String
B
Boolean
C
Decimal
D
Double
5) What is an appropriate name for a constant according to Hungarian notation?
A
decRate
B
$_RATE
C
decRATE
D
$rate
6) Which would best represent a variable that will hold a true or false value if an entry was valid?
A
Dim dbllsValid As Double
B
Dim IsValid As Integer
C
Dim blnlsValid As Boolean
D
Dim strlsValid As String
7) 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 Integer
C
Dim strGPA As String
D
Dim intGPA As Double
8) Which would be appropriate as a variable?
A
strFirstName
B
$PayRate
C
#HoursWorked
D
Last.Name
9) Which would be appropriate as an object name?
A
Last.Name
B
txtHoursWorked
C
GrossPay$
D
9DigitZip
10) What is an appropriate name for a textbox according to Hungarian notation?
A
$Textbox
B
BoxName
C
MONEY_TEXT
D
txtName
11) A variable named blnIsTrue is of what data type?
A
String
B
Boolean
C
Double
D
Integer
12) According to Hungarian notation, what is an appropriate name for a Textbox?
A
1stBoxName
B
boxName
C
txtName
D
TEXT_NAME
13) Which would best represent a Button control object that will be used to calculate an average?
A
dblCalculate
B
btnCalcAverage
C
Calculate
D
binAverage
14) A variable named strName is of what data type?
A
Double
B
Integer
C
String
D
Decimal
15) Which is a proper name for a button according to Hungarian notation?
A
btnAdd
B
AddButton
C
Button1
D
ButtonAdd
16) A variable named dblTaxRate is of what data type?
A
Integer
B
Decimal
C
String
D
Double
17) Which data type is appropriate to store the value 75.9?
A
Double
B
String
C
Boolean
D
Integer
*select an answer for all questions
Check Results & Get Answers
Play Games with the Questions Above
Teachers: Create FREE classroom games with your questions
Click for more info!
©2007-2024
ReviewGameZone.com
|
About
|
Privacy
|
Contact
|
Terms
|
Site Map
WAIT! Find what you needed?
×
Still Looking for the Answers?
Have Another Question?
Play a Review Game with These Questions?
Want to Make Your Own Test Like This One?