COP 3363 - Introduction to Programming (with C++ and
Unix) Exam 3 Prep
1. A volatile type of memory that is used for temporary storage is
A) RAM
B) a disk drive
C) an address
D) the ALU
E) None of these: RAM
2. Which of the following best describes an operator?
A) An operator is a word that has special meaning
B) An operator marks the beginning or ending of a statement, or is used to
separate items in a list
C) An operator is a rule that must be followed when constructing a program
D) An operator allows you to perform operations on one or more pieces of
data
E) An operator is a symbolic name that refers to a variable: An operator allows
you to perform operations on one or more pieces of data
3. A named storage location in the computer's memory that holds a piece of
information is a(n):
A) statement
B) operator
C) key word
D) variable
E) None of these: variable
4. The programmer usually enters source code into a computer with
A) a compiler
B) a hierarchy chart
C) a text editor
D) pseudocode
E) None of these: a text editor
5. The CPU's control unit retrieves the next instruction in a sequence of
program instructions from main memory in the stage.
A) decode
B) fetch
C) execute
D) portability: fetch
6. A model often used when creating a program that begins with the overall
task and refines it into smaller subtasks is a(n)
A) hierarchy chart
B) UML Diagram
C) blueprint
, COP 3363 - Introduction to Programming (with C++ and
Unix) Exam 3 Prep
D) flowchart
E) None of these: hierarchy chart
7. This is used in a program to mark the beginning or ending of a statement,
or separate items in a list:
A) key words
B) separators
C) punctuation
D) operators
E) None of these: punctuation
8. A computer stores a program while it is running
A) on a hard disk
B) on the computer monitor
C) in the CPU
D) in main memory
E) None of these: in main memory
9. This is a set of rules that must be followed when constructing a program:
A) identifiers
B) syntax
C) key words
D) operators
E) punctuation: syntax
10. At the heart of a computer is its central processing unit. The CPU's job is:
A) to carry out the operations commanded by the instructions
B) to fetch instructions
C) to produce some outcome or resultant information
D) All of these
E) None of these: All of these
11. In a C++ program, two slash marks (//) indicate
A) the beginning of a comment
B) the beginning of a block of code
C) the end of a statement
D) the end of a program
E) None of these: the beginning of a comment
12. Character constants in C++ are always enclosed in
A) braces ({})
B) brackets (<>)
C) pound sign and semicolon (#;)
D) single quotation marks ('')
E) Any of these: single quotation marks ('')
, COP 3363 - Introduction to Programming (with C++ and
Unix) Exam 3 Prep
13. Every complete C++ program must have a
A) comment
B) symbolic constant
C) function named main
D) cout statement
E) None of these: function named main
14. The causes the content of another file to be insterted into a
program
A) double slash (//)
B) cout object
C) #include directive
D) semicolon (;)
E) None of these: #include directive
15. What is the value of number after the following statements execute?
int number;
number = 18 % 4 + 2;
A) 6.5
B) 3
C) 0
D) 4
E) unknown: 4
16. For every opening brace in a C++ , there must be a
A) string literal
B) comment
C) function
D) closing brace
E) None of these: closing brace
17. Which data type typically requires only one byte of storage?
A) int
B) float
C) char
D) string
E) short: char
18. A multi-line comment
A) can be used to mark as many lines as desired as comments
B) begins with /* and ends with */
C) allows everything in the selected lines to be ignored
D) All of these are true: All of these are true
Unix) Exam 3 Prep
1. A volatile type of memory that is used for temporary storage is
A) RAM
B) a disk drive
C) an address
D) the ALU
E) None of these: RAM
2. Which of the following best describes an operator?
A) An operator is a word that has special meaning
B) An operator marks the beginning or ending of a statement, or is used to
separate items in a list
C) An operator is a rule that must be followed when constructing a program
D) An operator allows you to perform operations on one or more pieces of
data
E) An operator is a symbolic name that refers to a variable: An operator allows
you to perform operations on one or more pieces of data
3. A named storage location in the computer's memory that holds a piece of
information is a(n):
A) statement
B) operator
C) key word
D) variable
E) None of these: variable
4. The programmer usually enters source code into a computer with
A) a compiler
B) a hierarchy chart
C) a text editor
D) pseudocode
E) None of these: a text editor
5. The CPU's control unit retrieves the next instruction in a sequence of
program instructions from main memory in the stage.
A) decode
B) fetch
C) execute
D) portability: fetch
6. A model often used when creating a program that begins with the overall
task and refines it into smaller subtasks is a(n)
A) hierarchy chart
B) UML Diagram
C) blueprint
, COP 3363 - Introduction to Programming (with C++ and
Unix) Exam 3 Prep
D) flowchart
E) None of these: hierarchy chart
7. This is used in a program to mark the beginning or ending of a statement,
or separate items in a list:
A) key words
B) separators
C) punctuation
D) operators
E) None of these: punctuation
8. A computer stores a program while it is running
A) on a hard disk
B) on the computer monitor
C) in the CPU
D) in main memory
E) None of these: in main memory
9. This is a set of rules that must be followed when constructing a program:
A) identifiers
B) syntax
C) key words
D) operators
E) punctuation: syntax
10. At the heart of a computer is its central processing unit. The CPU's job is:
A) to carry out the operations commanded by the instructions
B) to fetch instructions
C) to produce some outcome or resultant information
D) All of these
E) None of these: All of these
11. In a C++ program, two slash marks (//) indicate
A) the beginning of a comment
B) the beginning of a block of code
C) the end of a statement
D) the end of a program
E) None of these: the beginning of a comment
12. Character constants in C++ are always enclosed in
A) braces ({})
B) brackets (<>)
C) pound sign and semicolon (#;)
D) single quotation marks ('')
E) Any of these: single quotation marks ('')
, COP 3363 - Introduction to Programming (with C++ and
Unix) Exam 3 Prep
13. Every complete C++ program must have a
A) comment
B) symbolic constant
C) function named main
D) cout statement
E) None of these: function named main
14. The causes the content of another file to be insterted into a
program
A) double slash (//)
B) cout object
C) #include directive
D) semicolon (;)
E) None of these: #include directive
15. What is the value of number after the following statements execute?
int number;
number = 18 % 4 + 2;
A) 6.5
B) 3
C) 0
D) 4
E) unknown: 4
16. For every opening brace in a C++ , there must be a
A) string literal
B) comment
C) function
D) closing brace
E) None of these: closing brace
17. Which data type typically requires only one byte of storage?
A) int
B) float
C) char
D) string
E) short: char
18. A multi-line comment
A) can be used to mark as many lines as desired as comments
B) begins with /* and ends with */
C) allows everything in the selected lines to be ignored
D) All of these are true: All of these are true