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=””><>