/* ok my question is the following let's say you declare a variable and itialize it.....and then you assign the address of that variable to a pointer, wouldn't the address of the pointer then be the same as the address of the variable that was created?Cosider the following:*/
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
int yourAge=15; //yourAge is initialized
cout<<"The address of yourAge is "<<&yourAge<<endl;
int *yourAgeManipulation=&yourAge; /*pointer is created and assigned your Age's
address */
cout<<"The addres of *yourAgeManipulation is"<<&yourAgeManipulation<<endl;/*Shouldn't *yourAgeManipulation have the same address as that of youAge. If it should tell me why if not please tell me why as well.*/
system("PAUSE");
return 0;
}
/*#####################################*/
OUTPUT:
The address of yourAge is 0x254fdd4
The addres of *yourAgeManipulation is0x254fdd0
Press any key to continue . . .
although the two address do look pretty close........please help