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
c programming

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!