Question: PART B: DEBUGGING [TOTAL OF 15 MARKS] The following program contains five different errors that would prevent it from compiling or result in undefined behaviour.

 PART B: DEBUGGING [TOTAL OF 15 MARKS] The following program contains

PART B: DEBUGGING [TOTAL OF 15 MARKS] The following program contains five different errors that would prevent it from compiling or result in undefined behaviour. Identify them by line number, explain briefly the error, and write a fix for it in the space provided. Each properly identified and fixed error is worth three marks. Assume that this code, once corrected, will compile using the GNU g++ compiler on matrix. 1. #include 2. using namespace std; 3. 4. class WEB222 { 5. int *ids ; 6 . int size; 7. public : 8. WEB222(const int *ids_, int n) { 9 . ids = new int[n]; 10. ids = ids_; 11. size = n; 12. 13. ~WEB222 (int n) { 14. cout display ( ) ; 30. return 0

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 Programming Questions!