Home / MCQ Bank / Computer
Computer Miscellaneous On Data Structures Difficulty: Medium

Consider the following recursive implementation of linear search on a linked list: struct Node { int val; struct Node* next; }*head; int linear_search(struct Node *temp,int value) { if(temp == 0) return 0; if(temp->val == value) return 1; return _________; } Which of the following lines should be inserted to complete the above code?

Select the correct option to test your answer:

More Computer Questions

What is the output of the following code: char str[] = "Hello"; cout << strlen(str); in C++? Which method in Ruby is used to write data to a file? Which of the following is not a complex number? Large computer system typically uses: Topological sort can be applied to which of the following graphs?