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