Read the code below and answer the following questions: Write a cout statement t
ID: 3013668 • Letter: R
Question
Read the code below and answer the following questions: Write a cout statement that uses the ptr variable to display the contents of the y variable. What will be displayed if you send the expression *iptr to cout? What happens if you send the expression iptr to cout? Assuming that soap is an instance of the Inventory class, which of the following below is a valid call to the setOnHand member function. setOnHand (20); soap:: setOnHand (20); soap. setOnHand (20); Inventory. setOnHand(20); The following program contains errors. Find as many as possible.Explanation / Answer
a) cout<<*ptr;
b) cout<<*iptr; Output-> 7
c) cout<<iptr; Output-> HEXADECIMAL ADDRESS OF x
d) C) soap.setOnHand(20);
e)
class circle
{
private:
double centerX;
double center;
double radius;
public:
void SetCenter(double,double);
void SetRadius(double);
};
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.