Exam Questions with Answers
linked list - Correct Answers: A sequence of items arranged one after another, with each item connected
to the next by a link is called a(n)
head pointer - Correct Answers: A pointer to the first node in a linked list is called the
tail pointer - Correct Answers: A pointer to the last node in a linked list is called the
an empty list - Correct Answers: A linked list that contains no nodes is called what?
null pointer - Correct Answers: A special C++ constant used for any pointer value that has no place to
point is called a
nodes - Correct Answers: A collection of _______ makes up a linked list.
(*p).m - Correct Answers: If p is a pointer to a class, and m is a member of the class, then p->m means
the same as
A. (*p).m
B. *p.m
C. (p.)m
D. (*p.)m
E. p.m
node - Correct Answers: What is the data type of *head_ptr in Figure 5.3 on page 224?
A. node
, B. pointer to a node
C. value_type
D. data_field
pointer to node - Correct Answers: What is the data type of head_ptr in Figure 5.3 on page 224?
A. pointer to a node
B. node
C. value_type
D. data_field
- Correct Answers: What is the data type of head_ptr->data( ) in Figure 5.3 on page 224? (The definition
of data( ) is on page 226.)
A. data_field
B. pointer to a node
C. node
D. value_type
- Correct Answers: What will the following function return?
int calculate(const node* head_ptr)
{
const node *ptr;
int n = 0;