You are on page 1of 2

1. Value of the first linked list index is _______ 1. One 2. Zero 3. -1 4. None of these 2.

A linked list index is ____ that represents the position of a node in a linke d list. 1. An Integer 2. a variable 3. a character 4. a boolean 3. Why is the constructor of the QueueLinkedList class empty? 1. because initialization of data members of the LinkedList class is perform ed by the constructor of the LinkedList class. 2. because initialization of data members of the LinkedList class is perform ed by the destructor of the LinkedList class. 3. because initialization of data members of the QueueLinkedList class is pe rformed by the constructor of the LinkedList class. 4. because initialization of data members of the QueueLinkedList class is pe rformed by the destructor of the LinkedList class 4. _______ form of access is used to add and remove nodes from a queue 1. LIFO,Last In First Out 2. FIFO , First In First Out 3. Both 1 and 2 4. None of these 5. ______ form of access is used to add and remove nodes from a stack 1. LIFO 2. FIFO 3. Both 1 and 2 4. None of these 6. New nodes are added to the _____ of the queue. 1. front 2. back 3. middle 4. Both 1 and 2 7. A _______ is a data structure that organizes data similar to a line in the su permarket, where the first one in line is the first one out. 1. queue linked list 2. stacks linked list 3. both of them 4. neither of them 8. In an array queue, data is stored in an _____ element. 1. Node 2. linked list 3. array 4. constructor 9. The pop() member function determines if the stack is empty by calling the ___ __ member function 1. removeback() 2. isEmpty() 3. removedfront() 4. hasNext() 10. What happens when you push a new node onto a stack? 1. the new node is placed at the front of the linked list. 2. the new node is placed at the back of the linked list. 3. the new node is placed at the middle of the linked list. 4. No Changes happens Answers

1. 2.

Zero An Integer

3. because initialization of data members of the LinkedList class is perform ed by the constructor of the LinkedList class. 4. 5. 6. 7. 8. 9. 10. FIFO , First In First Out LIFO back queue linked list array isEmpty() the new node is placed at the front of the linked list.

You might also like