Name: 
 

adven09 L2 SG



True/False
Indicate whether the statement is true or false.
 

 1. 

An organized way of storing data in a computer is referred to as a data structure.
 

 2. 

The C++ integer data types are used for storing real numbers.
 

 3. 

Not all C++ compilers allocate the same amount of storage for an int data type.
 

 4. 

If no value is assigned to a numeric variable when it is declared, the compiler automatically sets it to a value of zero.
 

 5. 

Variables must be declared at the beginning of a function or before the first function in the program, and cannot be declared following any program code statements.
 

 6. 

Multiple variables can be declared in a single program statement as long as they are all of the same data type.
 

 7. 

Alphabetic characters are stored internally in a computer as a numeric value.
 

 8. 

The Boolean data type is very useful in computer programs and all C++ compilers support that data type.
 

Multiple Choice
Identify the choice that best completes the statement or answers the question.
 

 9. 

What name is used to describe an area of a program that is used to store data that cannot be changed while the program is running?
a.
fixture
c.
variable
b.
constant
d.
container
 

 10. 

What term is used to describe the process of assigning a name to a variable and telling the compiler what data type to use for the variable?
a.
assigning a variable
c.
declaring a variable
b.
designating a variable
d.
variable generation
 

 11. 

Which of the following rules is true when it comes to assigning a name to a variable?
a.
variable names can contain spaces
b.
a variable name can start with a number
c.
a variable name can start with an underscore
d.
all of the above
 

 12. 

What is the name of the code used by most computers to assign numeric values to characters?
a.
ASCAP
c.
ASCDR
b.
ASCII
d.
ASNUM
 

 13. 

What name is used to describe a group of characters used together in a program to form a word or a sentence?
a.
block
c.
string
b.
set
d.
phrase
 

 14. 

Very large, and very small numbers, possibly containing fractional values can be stored in which of the following data types?
a.
int
c.
long
b.
double
d.
all of the above
 

 15. 

What keyword is used to define a constant value in a program?
a.
constant
c.
con
b.
cons
d.
const
 

Completion
Complete each statement.
 

 16. 

The C++ language is ____________________ and variables named price, and Price, would be treated as separate variables.
 

 

 17. 

The C++ ____________________ data type can hold only one of two values, one that represents True or a value that represents False.
 

 

 18. 

When a constant is declared in a C++ program, the ____________________ prevents the assignment of another value to that constant after the declaration statement has been processed.
 

 



 
Check Your Work     Start Over