Question: Task# 1 The following are different programs that implement pointers. What would be the result of each ? Explain in details the concept of each

Task# 1
The following are different programs that implement pointers. What would be the result of each ? Explain in details the concept of each line of below codes.
1 #include using namespace std;
int main()
{//Assume that the address of the variable a =0015FAA0 int a; int *aPtr; a =7;
aPtr = &a;
cout << &a << endl; cout << aPtr << endl;
cout << a << endl; cout <<*aPtr << endl;
cout << &*aPtr << endl; cout <<*&aPtr << endl; return 0;}

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!