Question: Problem 3. In the following array of C-strings char* names[] = { DEF, BBB , EE, AA, CAB, AAA, DDDD, BBB, FFFF, CCCC}; char* favoriteName=
Problem 3. In the following array of C-strings
char* names[] = { DEF, BBB , EE, AA, CAB, AAA, DDDD, BBB, FFFF, CCCC};
char* favoriteName= AA;
- Use generic binary search both iterative and recursive to find the favoriteName in the names array.
If char names[][5] = { DEF, BBB , EE, AA, CAB, AAA, DDDD, BBB, FFFF, CCCC};
char* favoriteName= AA;
- What will be your call for search and why?
Now dynamically allocate char**names and fill with all the names above and dynamically allocate char*favoriteName and fill with AA
- Make a call for the search
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
