Name:     ID: 
 
Email: 

Adven Final Exam Part 1

Completion
Complete each statement.
 

 1. 

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

 

 2. 

The process of assigning a value to a variable when it is declared is called ____________________ the variable.
 

 

 3. 

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

 

 4. 

A(n) ____________________ is a named location in a program that is used to store data that can be accessed and modified while the program is executing.
 

 

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

 5. 

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

 6. 

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.
 

 7. 

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

 8. 

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

 9. 

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

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

 10. 

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

 11. 

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

 12. 

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.
variable
c.
fixture
b.
constant
d.
container
 

 13. 

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

 14. 

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

 15. 

Which statement below shows the correct syntax for declaring a variable named cost with a data type of long, and an initial value of 57.650?
a.
long cost = 57.650;
c.
long cost,57.650 ;
b.
long cost:57.650;
d.
cost type = long, value = 57.650;
 

 16. 

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.
designating a variable
c.
variable generation
b.
assigning a variable
d.
declaring a variable
 



 
         Start Over