In: Computer Science
Describe two debugging techniques that are used for C programs. Which of these techniques do you use most often and why do you use it rather than another technique? Why do you find this technique works better than the other technique?
i need help with this question
What is Debugging?
Definition: The important technique to find and remove the number of errors or bugs or defects in a program is called Debugging. It is a multistep process in software development. It involves identifying the bug, finding the source of the bug and correcting the problem to make the program error-free. In software development, the developer can locate the code error in the program and remove it using this process. Hence, it plays a vital role in the entire software development lifecycle.
To perform the debugging process easily and efficiently, it is necessary to follow some techniques. The most commonly used debugging strategies are,
Debugging by brute force is the most commonly used technique. This is done by taking memory dumps of the program which contains a large amount of information with intermediate values and analyzing them, but analyzing the information and finding the bugs leads to a waste of time and effort.
Induction strategy includes the Location of relevant data, the Organization of data, the Devising hypothesis (provides possible causes of errors), and the Proving hypothesis.
Deduction strategy includes Identification of possible causes of bugs or hypothesis Elimination of possible causes using the information Refining of the hypothesis( analyzing one-by-one)
The backtracking strategy is used to locate errors in small programs. When an error occurs, the program is traced one step backward during the evaluation of values to find the cause of bug or error.
Debugging by testing is the conjunction with debugging by induction and debugging by deduction technique. The test cases used in debugging are different from the test cases used in the testing process.
Debugging by testing is better than other technique