Question: #include using namespace std; struct Person { int weight; int height, }; int main() { Person fred, Person* ptr = &fred fred weight=190 fred height=70

 #include using namespace std; struct Person { int weight; int height,

#include using namespace std; struct Person { int weight; int height, }; int main() { Person fred, Person* ptr = &fred fred weight=190 fred height=70 return 0; } What is a correct way to subtract 5 from fred's weight using the pointer variable 'ptr'? O ptr->weight = ptr->weight -5 O *ptr->weight = *ptr->weight-5, None of these O ptr weight = ptr.weight -5

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!