Question: Task 2 , debug the code - - 1 2 MarksThe following code segment fails to initialize the array elements to 1 . State the
Task debug the code MarksThe following code segment fails to initialize the array elements to State the usage of the keyword auto. Rewrite the code segment so that it could work.int ptr new int; forauto& x : ptrx ;Objectives recorrect the code and make it work by using three different ways. explain the reason why the code contains problems explain how your proposed different approaches solve this problem.submit your code into debug.cpp subtask and subtask should be included in comments of your debug.cpp
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
