Review Game Zone
Flash Cards
(current)
Games
Teachers
Search
Variables In Programs
Test Description: Review for the state Skills Exam.
Instructions: Answer all questions to get your test result.
1) What is the scope of a variable?
A
a true or false
B
Visibility (Where it can be used)
C
An error in naming conventions
D
It\'s data type
2) Which of the following is a valid variable identifier?
A
1money
B
myMoney1
C
my money
D
3
3) Which of the following is a valid variable declaration?
A
myMoney = double;
B
myMoney double;
C
const myMoney;
D
double myMoney;
4) What is the data type of the following? Color myColor;
A
Color
B
int
C
myColor
D
file
5) What is the data type of the following? bool flag;
A
bool
B
int
C
file
D
flag
6) Which of the following initializes a variable correctly;
A
bool flag = true;
B
flag bool
C
bool true = flag;
D
bool true;
7) Where should variables be declared?
A
Anywhere you want
B
At the beginning of the function or program
C
At the end of the function or program
D
never at all
8) Which of the following is an int?
A
45.3
B
true
C
Fred
D
-2
9) Which of the following is a double?
A
-2
B
Fred
C
45.3
D
true
10) Which of the following is a String?
A
Fred
B
-2
C
45.3
D
true
*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?