Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

More Books

Students also viewed these Databases questions

Question

=+What do you think their objectives might have been?

Answered: 1 week ago