Question
There are 10 run-time, compile and code safety problems with the following program. (One of the problems is revealed below as an example of how
There are 10 run-time, compile and code safety problems with the following program.
(One of the problems is revealed below as an example of how to answer this question)
Debug and improve the following program for compilation and run-time errors and also code safety corrections.
Specify each problem by including line number, the type of problem, with a suggested fix. See the example below for the format of answering the question:
An Example to show how to answer this question: Line 13: [1 mark] Compile error, ostream must be returned by reference [2 marks] Fix: ostream& print() [2 marks]
9 mistakes to find, 45 points to collect.
Program to debug:
H #includeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started