-
A Node has ___ elements.
Skill/Topic: Linked ListA) NoneB) OneC) TwoD) ThreeExplanation: A node has three elements. These are the current data and pointers to the previous node and the next node on the linked list
-
Why is the isEmpty() member method called?
Skill/Topic: QueueA) The isEmpty() member method is called within the dequeue process to determine if there is an item in the queue to be removed.
-
The _______ process places data at the back of the queue.
Skill/Topic: QueueA) enqueueB) dequeueC) priority queue
-
Items on a priority queue can jump to the front of the line if they have priority.
Skill/Topic: QueueA) TrueB) FalseExplanation: A priority queue is similar to a simple queue in that items are organized in a line and processed sequentially. However, items on a priority queue can jump to the front of the line if they have priority. Priority is a value that is associated with each item placed in the queue.
-
Priority queue organizes items in a line where the first item is at the beginning of the line and the last item is at the back of the line.
Skill/Topic: QueueA) TrueB) FalseExplanation: A simple queue organizes items in a line where the first item is at the beginning of the line and the last item is at the back of the line. Each item is processed in the order in which it appears in the queue. The first item in line is processed first, followed by the second item and then the third until the last item on the line is processed.
-
Data in a queue is accessible.
Skill/Topic: QueueA) First in First outB) First in last outC) Last in First outExplanation: Data in a queue is accessible in a First in First out (FIFO) Concept
-
Constructor is a member method of a class that is called when an instance of the class is declared.
Skill/Topic: Stacks using an ArrayA) TrueB) FalseExplanation: A constructor is a member method of a class that is called when an instance of the class is declared. A destructor is a member method of a class that is called when the instance of the class falls out of scope.
-
What kind of value is assigned to the top attribute?
Skill/Topic: Stacks using an ArrayA) VariableB) IndexC) CharacterD) FloatExplanation: The value at the top attribute is an index.
-
The isEmpty() member method determines if there is room for one more value on the stack.
Skill/Topic: Stacks using an ArrayA) TrueB) FalseExplanation: The isFull() member method determines if there is room for one more value on the stack.
-
Char *ptGrade;The use of the symbol ; ( semi colon) in the above example is wrong.
Skill/Topic: Variables and PointersA) TrueB) FalseExplanation: the symbol ; ( semi colon) tells the computer this is an instruction (statement)
-
What is precision?
Skill/Topic: Memory, Abstract Data Types, and AddressesA) Precision refers the accuracy of the decimal portion of a value
-
The byte abstract data type is the smallest abstract data type in the integer group and is declared by using the keyword byte.
Skill/Topic: Memory, Abstract Data Types, and AddressesA) TrueB) FalseExplanation: The byte abstract data type is the smallest abstract data type in the integer group and is declared by using the keyword byte. ‘byte abstract data type’ is commonly used when sending data to and receiving data from a file or across a network.
-
_________ is the way you groups things together by placing one thing on top of another and then removing things one at a time from the top.
Skill/Topic: Stacks using an ArrayA) ArrayB) StackC) PointerD) All of the above
Data Structures Interview Questions
Ans