Home / MCQ Bank / Computer
Computer Miscellaneous On Data Structures

Consider the following code snippet to find the smallest element in a linked list: struct Node { int val; struct Node* next; }*head; int get_min() { struct Node* temp = head->next; int min_num = temp->val; while(temp != 0) { if(_________) min_num = temp->val; temp = temp->next; } return min_num; } Which of the following lines should be inserted to complete the above code?

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option C • temp->val < min_num

Related Computer Questions

Which of the following plays an important role in developing common protocols for the evolution of www? An ___________ rule is used to define a page block for printed styles. Which of the following is a complete function? What is the minimum dominating set of the binary tree given below? Which of the following is helpful in evaluating applications software what will best suit your needs?