Variables In Programs Question Preview (ID: 12070)


Review For The State Skills Exam. TEACHERS: click here for quick copy question ID numbers.

What is the scope of a variable?
a) Visibility (Where it can be used)
b) a true or false
c) It\'s data type
d) An error in naming conventions

Which of the following is a valid variable identifier?
a) 1money
b) 3
c) my money
d) myMoney1

Which of the following is a valid variable declaration?
a) myMoney = double;
b) const myMoney;
c) myMoney double;
d) double myMoney;

What is the data type of the following? Color myColor;
a) myColor
b) int
c) Color
d) file

What is the data type of the following? bool flag;
a) flag
b) bool
c) int
d) file

Which of the following initializes a variable correctly;
a) bool true;
b) flag bool
c) bool flag = true;
d) bool true = flag;

Where should variables be declared?
a) At the beginning of the function or program
b) At the end of the function or program
c) never at all
d) Anywhere you want

Which of the following is an int?
a) 45.3
b) -2
c) true
d) Fred

Which of the following is a double?
a) 45.3
b) -2
c) true
d) Fred

Which of the following is a String?
a) 45.3
b) -2
c) true
d) Fred

Play Games with the Questions above at ReviewGameZone.com
To play games using the questions from above, visit ReviewGameZone.com and enter game ID number: 12070 in the upper right hand corner or click here.

TEACHERS / EDUCATORS
Log In
| Sign Up / Register