Question: 15. The pointer in a node points to Select one: a. the data part of a node. b. the count part of a node. c.
15.
The pointer in a node points to
Select one:
a. the data part of a node.
b. the count part of a node.
c. the pointer part of the node.
d. the whole node.
16.
Removing data from a stack is called popping the stack.
Select one:
True
False
17.
*head.item is the same as (*head).item.
Select one:
True
False
18.
If you push the following numbers onto an integer stack, what item is on the top of the stack? (1,4,8,16)
Select one:
a. 1
b. 4
c. 8
d. 16
19.
To remove an item from the stack, we call the ________ function.
Select one:
a. pop
b. top
c. push
d. empty
20.
Placing data on a stack is called popping the stack.
Select one:
True
False
21.
To add an item to a stack, we call the ________ function.
Select one:
a. pop
b. top
c. push
d. empty
22.
A stack is a first-in-first-out data structure.
Select one:
True
False
23.
If you need to insert an element in the front of a list with N nodes (and move the other elements back one place), how many nodes do you have to move?
Select one:
a. 0
b. 1
c. N-1
d. N
24.
A stack exhibits ________ behavior.
Select one:
a. last-in/ first-out
b. last-in/last-out
c. first-in/first-out
d. None of these
25.
There is no need for error checking when pushing a stack.
Select one:
True
False
26.
When would you use a linked list over an array or a dynamic array?
Select one:
a. when you know the maximum size at compile time
b. when you know the maximum size at run-time
c. when you do not know the maximum size
d. when you need to access any item quickly
27.
If you write a linked list class, then you should implement the destructor, copy constructor, and the assignment operator.
Select one:
True
False
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
