Question
1) Read the following code and see whether you can interpret/understand the results. (2) Copy the code to your IDE. Use debugger to see the
1) Read the following code and see whether you can interpret/understand the results. (2) Copy the code to your IDE. Use debugger to see the if the result is the same as your interpreted results.
int a = 5; //assume that a is located at 1000. as pointer is located at 5000
int &b = a;
a = 10;
cout<<&b< int *c = &b; cout< int** cPtrPtr = &c; cout<<*c< cout< int d = 20; int* dPtr = &d; int** dPtrPtr = &dPtr; dPtr= *cPtrPtr; cout<<*dPtr< cout< cout < 8. Introduce a main function that calls all the functions above (No. 7 can be inside a function or inside main).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started