Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

LESSUN SA LAB 9.1 Introduction to Pointer Variables Retrieve program poin from t

ID: 3934894 • Letter: L

Question

LESSUN SA LAB 9.1 Introduction to Pointer Variables Retrieve program poin from the Lab 9 folder. The code is as follows: This program demonstrates the use of pointer variables It finds the area of a rectangle given length and width It prints the length and width in ascending order PLACE YOUR NAME HERE include kiostream> using namespace std; int main int length; holds length holds width int width int area; holds area int pointer which will be set to point to length int *length Ptr; int pointer which will be set to point to width int *width Ptr; continwes

Explanation / Answer

lengthPtr = &length;

widthPtr = &width;

area = (*lengthPtr)*(*widthPtr);

if((*lengthPtr)>(*widthPtr))

else if((*widthPtr)>(*lengthPtr))