logo

Crowdly

Browser

Add to Chrome

Consider the following function, which recursively searches for the maximum in a...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Consider the following function, which recursively searches for the maximum in a list :

int maxRecList(t_cell *cell, int cur_max)

{

if (cell == NULL) {

return cur_max;

}

if (cell->value > cur_max) {

cur_max = cell->value;

}

return maxRecList(cell->next, cur_max);

}
we want to call this function from the main program, for a non-empty list named list_1.

Which main program is used to make this call to obtain the correct result ?

(we assume that all the right #includes have been made)

More questions like this

Want instant access to all verified answers on moodle.myefrei.fr?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome