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 does not have underscore as one of its characters.
B
It does not start with a number.
C
It should be at least 6 characters.
D
It is a Visual Basic reserved keyword.
2) In the statement, lblMessage.Text = This is a label. What does lblMessage refer to?
A
Label control
B
Selected object
C
Type of event
D
Form object
3) A variable named intGrade is of what data type?
A
Double
B
String
C
Decimal
D
Integer
4) A variable named decBonus is of what data type?
A
Decimal
B
Boolean
C
Double
D
String
5) What is an appropriate name for a constant according to Hungarian notation?
A
$_RATE
B
decRATE
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 IsValid As Integer
B
Dim blnlsValid As Boolean
C
Dim dbllsValid As Double
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 intGPA As Integer
B
Dim intGPA As Double
C
Dim dblGPA As Double
D
Dim strGPA As String
8) Which would be appropriate as a variable?
A
$PayRate
B
strFirstName
C
Last.Name
D
#HoursWorked
9) Which would be appropriate as an object name?
A
9DigitZip
B
GrossPay$
C
Last.Name
D
txtHoursWorked
10) What is an appropriate name for a textbox according to Hungarian notation?
A
BoxName
B
$Textbox
C
txtName
D
MONEY_TEXT
11) A variable named blnIsTrue is of what data type?
A
Boolean
B
Double
C
String
D
Integer
12) According to Hungarian notation, what is an appropriate name for a Textbox?
A
1stBoxName
B
txtName
C
boxName
D
TEXT_NAME
13) Which would best represent a Button control object that will be used to calculate an average?
A
Calculate
B
btnCalcAverage
C
binAverage
D
dblCalculate
14) A variable named strName is of what data type?
A
Double
B
String
C
Integer
D
Decimal
15) Which is a proper name for a button according to Hungarian notation?
A
AddButton
B
Button1
C
ButtonAdd
D
btnAdd
16) A variable named dblTaxRate is of what data type?
A
Integer
B
Double
C
String
D
Decimal
17) Which data type is appropriate to store the value 75.9?
A
Boolean
B
String
C
Integer
D
Double
*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?