vu cs301 Mid Term - Quiz No.8
vu cs301 Data Structures Quiz
This quiz belongs to book/course code vu cs301 Data Structures of vu organization. We have 40 quizzes available related to the book/course Data Structures. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic Mid Term. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.
NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.
Question 1: The following are statements related to queues.
(i) The last item to be added to a queue is the first item to be removed
(ii) A queue is a structure in which both ends are not used
(iii) The last element hasn't to wait until all elements preceding it on the queue are removed
(iv)A queue is said to be a last-in-first-out list or LIFO data structure
Which of the above is/are related to normal queues?
(i) The last item to be added to a queue is the first item to be removed
(ii) A queue is a structure in which both ends are not used
(iii) The last element hasn't to wait until all elements preceding it on the queue are removed
(iv)A queue is said to be a last-in-first-out list or LIFO data structure
Which of the above is/are related to normal queues?
(iii) and (ii) only
(i), (ii) and (iv) only
(ii) and (iv) only
None of the given options
Question 2: Consider a min heap, represented by the following array:
3,4,6,7,5,10
After inserting a node with value 1.Which of the following is the updated min heap?
3,4,6,7,5,10
After inserting a node with value 1.Which of the following is the updated min heap?
3,4,6,7,5,10,1
3,4,6,7,5,1,10
3,4,1,5,7,10,6
1,4,3,5,7,10,6
Question 3: Which one of the following is NOT a part of competitive analysis?
Identifying competitors
Assessing competitors
Selecting competitors to attack and avoid
Situation analysis
Question 4: Suppose currentNode refers to a node in a linked list (using the Node class with member variables called data and nextNode). What statement changes currentNode so that it refers to the next node?
currentNode ++;
currentNode = nextNode;
currentNode += nextNode;
currentNode = currentNode->nextNode;
Question 6: The nodes with no successor are called __________.
Root Nodes
Leaf Nodes
Both of these
None of these
Question 7: Suppose a pointer has been declared in main but has not assigned any variable address then
That pointer points to First byte in main function
That pointer contains a NULL value
None of these
That pointer points to any memory address
Question 8: What statement changes currentNode so that it refers to the next node?
currentNode += nextNode;
currentNode = nextNode;
currentNode = currentNode->nextNode;
currentNode ++;
Question 10: When should you use a const reference parameter?
Whenever the parameter has huge size
Whenever the parameter has huge size, the function changes the parameter within its body, and you do NOT want these changes to alter the actual argument
Whenever the parameter has huge size, the function changes the parameter within its body, and you DO want these changes to alter the actual argument
Whenever the parameter has huge size, and the function does not change the parameter within its body