gs gs122 Recursion - Largest and Smallest Number in an Array using Recursion - Quiz No.1
gs gs122 Data Communication and Computer Network Quiz
This quiz belongs to book/course code gs gs122 Data Communication and Computer Network of gs organization. We have 268 quizzes available related to the book/course Data Communication and Computer Network. This quiz has a total of 11 multiple choice questions (MCQs) to prepare and belongs to topic Recursion. 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.
int get_max_element(int *arr,int n) { int i, max_element = arr[0]; for(i = 1; i < n; i++) if(________) max_element = arr[i]; return max_element; }
Which of the following lines should be inserted to complete the above code?
int get_min_element(int *arr, int n) { int i, min_element = arr[0]; for(i = 1; i < n; i++) if(_______) min_element = arr[i]; return min_element; }
Which of the following lines should be inserted to complete the above code?
int max_of_two(int a, int b) { if(a > b) return a; return b; } int recursive_max_element(int *arr, int len, int idx) { if(idx == len - 1) return arr[idx]; return _______; }
Which of the following lines should be inserted to complete the above code?