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
Get step-by-step solutions from verified subject matter experts
