Q1027
Consider the following code snippet to search an element in a linked list: struct Node int val; struct Node* next; *head; int linear_search(int value) struct Node *temp = head->next; while(temp != 0) if(temp->val == value) return 1; _________; return 0; Which of the following lines should be inserted to complete the above code?
A.
temp = next
B.
temp->next = temp
C.
temp = temp->next
AnswerD.
return 0
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board