Question: C++ PROGRAMMING What is the output? Draw a Diagram or memory structure #include using namespace std; int main() { double dec1 = 2.5; double dec2

C++ PROGRAMMING

What is the output? Draw a Diagram or memory structure

#include

using namespace std;

int main() { double dec1 = 2.5; double dec2 = 3.8; double *p, *q; p = &dec1; *p = dec2 = dec1; q = p; *q = 10.0; *p = 2 * dec1 + (*q); q = &dec2; dec1 = *p + *q; cout << dec1 << "\t" << dec2; cout << " " << *p << "\t" << *q; cout << endl; }

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!