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
It\'s data type
C
An error in naming conventions
D
Visibility (Where it can be used)
2) Which of the following is a valid variable identifier?
A
my money
B
myMoney1
C
1money
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
int
B
Color
C
myColor
D
file
5) What is the data type of the following? bool flag;
A
bool
B
int
C
flag
D
file
6) Which of the following initializes a variable correctly;
A
bool true;
B
bool true = flag;
C
flag bool
D
bool flag = true;
7) Where should variables be declared?
A
never at all
B
Anywhere you want
C
At the end of the function or program
D
At the beginning of the function or program
8) Which of the following is an int?
A
Fred
B
true
C
45.3
D
-2
9) Which of the following is a double?
A
true
B
45.3
C
Fred
D
-2
10) Which of the following is a String?
A
true
B
45.3
C
Fred
D
-2
*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?