Select the correct option to test your answer:
More Computer Questions
How many times is the function recursive_search_num() called when the following code is executed? #include<stdio.h> int recursive_search_num(int *arr, int num, int idx, int len) { if(idx == len) return -1; if(arr[idx] == num) return idx; return recursive_search_num(arr, num, idx+1, len); } int main() { int arr[8] ={1,2,3,3,3,5,6,7},num=5,len = 8; int indx = recursive_search_num(arr,num,0,len); printf("Index of %d is %d",num,indx); return 0; }
How many parameters does the replaceState() method take?
What will be the output of the following C++ code? #include <iostream> using namespace std; #define PR(id) cout << "The value of " #id " is "<<id int main() { int i = 10; PR(i); return 0; }
What is the worst case time complexity of strand sort?
What will be the output of the following code: my_string = " Hello, World! " print(my_string.strip())