Exam 8: Data Abstractions
Exam 1: Data Representation64 Questions
Exam 2: Data Representation63 Questions
Exam 3: Operating Systems47 Questions
Exam 4: Networks and the Internet62 Questions
Exam 5: Algorithms53 Questions
Exam 6: Programming Languages54 Questions
Exam 7: Software Engineering54 Questions
Exam 8: Data Abstractions53 Questions
Exam 9: Database Systems52 Questions
Exam 10: Computer Graphics47 Questions
Exam 11: Artificial Intelligence52 Questions
Exam 12: Theory of Computation51 Questions
Select questions type
In a machine language,the technique in which the data to be manipulated by an instruction is included within the instruction itself is called
Free
(Multiple Choice)
4.8/5
(39)
Correct Answer:
A
Which of the following is not used when determining the location of an entry in a two-dimensional array stored in row-major order?
Free
(Multiple Choice)
4.8/5
(38)
Correct Answer:
B
What sequence of nodes from the tree
would be printed if the following recursive procedure were applied to it? (The procedure uses a global stack called Stack that is assumed to begin empty.)
def printTree(Tree):
if (Tree is not None):
Stack.push(Tree.Value)
printTree(Tree.Right)
if (not Stack.isEmpty()):
print(Stack.pop())

Free
(Short Answer)
4.9/5
(36)
Correct Answer:
G,C,A
If the longest path in a binary tree contains five nodes,what is the maximum number of terminal nodes that could be in the tree?
(Short Answer)
4.8/5
(40)
Suppose a queue contained the entries A,B,C,D (from head to tail)and suppose that the entries were removed and pushed on a stack one at a time until the queue was empty.What would be the contents of the queue (again from head to tail)if the entries were then popped from the stack and inserted back in the queue one at a time.
(Short Answer)
4.7/5
(33)
If the number of nodes in a binary tree is 2ⁿ (where n is a positive integer),then the entire tree would contain at least
(Multiple Choice)
4.8/5
(42)
Suppose a binary tree contained the nodes W,X,Y,and Z.If W and X were children of Y,and Z had no children,which node would be the root?
(Multiple Choice)
4.9/5
(32)
If the two-dimensional array X were stored in row-major order,then in the block of main memory containing X,which of the following would be true?
(Multiple Choice)
4.8/5
(31)
The table below represents a portion of a computer's main memory containing a binary tree.Each node consists of three cells,the first being data,the second being a pointer to the node's left child,and the third being a pointer to the node's right child.If the null pointer is represented by 00 and the tree's root pointer contains 53,how many nodes are on the longest path in the tree?
Address Contents 50 AA 51 56 52 00 53 54 00 55 50 56 57 00 58 00
(Short Answer)
4.8/5
(34)
If a queue contained the entries w,x,y,z (from head to tail),which of the following would be the contents after two entries were removed and the entry r was inserted?
(Multiple Choice)
4.8/5
(33)
In a machine language,what advantage does indirect addressing offer over immediate and direct addressing?
(Essay)
4.8/5
(41)
The table below represents a portion of a computer's main memory containing a linked list.Each entry consists of two cells,the first being data,the second being a pointer to the next entry.If the null pointer is represented by 00 and the list's head pointer contains 52,modify the memory cells so the data at address 50 replaces the second entry in the list.
Address Content 50 51 00 52 53 58 54 55 00 56 57 00 58 59 54
(Essay)
4.9/5
(31)
Answer the following questions in terms of the tree below.
A. The root node is ________ .
B. Three nodes that are siblings are _______ , ________, and ________ .
C. The terminal nodes are _________________________________________ .
D. The node with only one child is _________ .

(Short Answer)
4.8/5
(32)
Suppose you were going to retrieve items of data that you would later need to process in the opposite order from that in which they were retrieved.Which of the following would be the best structure in which to store the items?
(Multiple Choice)
4.9/5
(35)
If the type BananaSplit was defined by a statement such as
struct BananaSplit
{
int Banana;
int IceCream;
int Chocolate;
int WhippedCream;
int Nuts;
int Cherry
}
what statement would probably be used to declare the variable Desert to be an instance of that type?
(Short Answer)
4.8/5
(41)
If the variable named Box had the user-defined type RectangleType defined by
struct RectangleType
{
float length;
float width;
float height
}
What expression would be used to reference the length of Box?
(Short Answer)
4.8/5
(32)
The table below represents a portion of a computer's main memory containing a binary tree.Each node consists of three cells,the first being data,the second being a pointer to the node's left child,and the third being a pointer to the node's right child.If the null pointer is represented by 00 and the tree's root pointer contains 50,which of the following is a picture of the tree? Address Conten 50 51 56 52 53 53 54 00 55 00 56 57 00 58 00
(Multiple Choice)
4.7/5
(31)
The nodes in which of the trees below will be printed in alphabetical order by the following recursive procedure?
def printTree (Tree):
If (Tree is not None):
PrintTree(Tree.Left)
PrintTree (Tree.Right)
Print(Tree.Value)
(Multiple Choice)
4.8/5
(27)
Two special forms of lists are the LIFO structures known as _______________ ,in which entries are
inserted and removed from the ______________ ,and FIFO structures known as ________________ ,
in which entries are removed from the ________________ and inserted at the ________________ .
(Short Answer)
4.9/5
(42)
What is the distinction between direct addressing and indirect addressing?
(Essay)
4.9/5
(30)
Showing 1 - 20 of 53
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)