Question: Question need help finishing this, this is a debugging question... Question need help finishing this, this is a debugging question that only has 1 error
Question need help finishing this, this is a debugging question...
Question need help finishing this, this is a debugging question that only has 1 error in it
The following code defines a function that returns the larger of two inputs passed to the function. There is one problem in this code (Logical, Compile Error, Improvement, Runtime).
Identify the problem and provide the correction in the following format:
- Line number
- Type of problem ===> Example: runtime error
- Problem description ===> Example: 'var' is used before being initialized, error is thrown because 'var' has no value.
- How to fix ===> Example: initialize 'var' in the constrcutor (var = 0)
Another example of the format is below:
line: ???
type: type of error
Problem: the nature of error or bug
Fix: How to fix it:
Example:
Line: 22
Type: run time error
Problem: deleting uninitialized pointer var.
Fix: set var to nullptr in the constructor
[IMPORTANT] Please note that the line number stated in the answer must correctly point to the problem location. If the line number does not match the problem then answer is invalid. Basically say if line 19 was used in line 19 the problem has to be their.
#include
using namespace std;
template
cout << "The larger value between " << num1 << " and " << num2 << " is " << Max
return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
