The output

What is the output of the following C++ code? (2, 3, 6)

int *myPtr = new int;

int *yourPtr = new int;

*myPtr = 10;

*yourPtr = 2 * *myPtr + 3;

cout < *myptr=””>< “=”” “=””>< (*yourptr=”” -=”” *myptr=”” +=”” 5)=””><>

myPtr = yourPtr;

yourPtr = new int;

*yourPtr = 8;

cout < *myptr=””>< “=”” “=””>< *yourptr=””><>

*myPtr = 17;

*yourPtr = 4;

cout < *myptr=””>< “=”” “=””>< *yourptr=””><>

What is the output of the following C++ code? (2, 3, 6)

double *trip1Cost = new double;

double *trip2Cost = new double;

double *trip3Cost = new double;

double *max;

*trip1Cost = 100.00;

*trip2Cost = 350.00;

 trip3Cost = trip2Cost;

trip2Cost = trip1Cost;

trip1Cost = new double;

*trip1Cost = 175;

*trip3Cost = 275;

cout < fixed=””>< showpoint=””><>

cout < “trip=”” total=”” cost:=””>

     < (*trip1cost=”” +=”” *trip2cost=”” +=”” *trip3cost)=””><>

max = trip1Cost;

if (*max <>

    max = trip2Cost; if (*max <>

    max = trip3Cost;

cout < “highest=”” trip=”” cost:=”” $”=””>< *max=””><>

WhatsApp
Hello! Need help with your assignments?

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

🛡️ Worried About Plagiarism? Run a Free Turnitin Check Today!
Get peace of mind with a 100% AI-Free Report and expert editing assistance.

X