Search for question
Question

This "project" is more like a homework. There are five problems. In problems that ask you to change code, make the few changes necessary to fix the code without changing

its overall approach. For example, don't fix the program in problem 1a by changing it to 1. The subparts to this problem involve errors in the use of pointers. a. This program is supposed to write 30 20 10, one per line. Find all of the bugs and show a fixed version of the program: b. The find Max function is supposed to find the maximum item in an array and set the pTo Max parameter to point to that item so that the caller knows that item's location.Explain why this function won't do that, and show a way to fix it. Your fix must be to the function only; you must not change the main routine below in any way, yet as a result of your fixing the function, the main routine below must work correctly. c. The compute Cube function is correct, but the main function has a problem. Explain why it may not work and show a way to fix it. Your fix must be to the main function only; you must not change compute Cube in any way. d. The strequal function is supposed to return true if and only if its two C string arguments have exactly same text. Explain what the problems with the implementation of the function are, and show a way to fix them. e. This program is supposed to write 100 99 98 3 2 1, but it probably does not. What is theprogram doing that is incorrect? (We're not asking you explain why the incorrect actionleads to the particular outcome it does, and we're not asking you to propose a fix tothe problem.)

Fig: 1

Fig: 2

Fig: 3

Fig: 4

Fig: 5

Fig: 6

Fig: 7

Fig: 8

Fig: 9

Fig: 10

Fig: 11

Fig: 12

Fig: 13

Fig: 14