Question: SUBJECT: PROGRAMMING LANGUAGE: C++ THE QUESTION GIVE THE WRONG ERROR IN CERTAIN PART(BY LINE) CHOICE ONLY 5 THE TRUE ERROR FASTER PLEASE Find a total

 SUBJECT: PROGRAMMING LANGUAGE: C++ THE QUESTION GIVE THE WRONG ERROR IN

SUBJECT: PROGRAMMING

LANGUAGE: C++

THE QUESTION GIVE THE WRONG ERROR IN CERTAIN PART(BY LINE)

CHOICE ONLY 5 THE TRUE ERROR

FASTER PLEASE

Find a total of only Five (5) errors in the following code segments. You can select more than 5 errors, but one wrong answer will result in deduction of one point. 1 #include 2 using namespace std; 3 4 int main() 5 6 1 7 8 int length; // holds length 9 int width, // holds width 10 int area; // holds area 11 12 int *lengthPtr = nullptr; // int pointer set to point to length 13 int width Pr* - nullptr; // int pointer set to point to width 14 15 cout > length; 17 18 cout > width; 20 21 lengthPtr - Glength; 22 widthPtr = {width; 23 24 area- *lengthPtr * *widthPtr; 25 cout *widthptr) 28 cout lengthptr) 31 cout *lengthPtr) Line 27: if (lengthPtr> widthPtr) Line 9: int width Line 2: using namespace std::cout: Line 30: else if (&widthPtr> SlengthPtr) Line 13: int *widthPtr - nullptr, Line 35: 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 Databases Questions!