manojg
March 11th, 2005, 06:03 PM
Hi,
In this code, the output of the 2nd cout is just the address of v1. What is the output of the 3rd cout? Does it mean anything?
main()
{
int *p1, v1;
p1 = &v1;
v1 = 20;
cout << *p1 << endl;
cout << p1 << endl;
cout << &p1 << endl;
return 0;
}
Thanks.
Manoj
In this code, the output of the 2nd cout is just the address of v1. What is the output of the 3rd cout? Does it mean anything?
main()
{
int *p1, v1;
p1 = &v1;
v1 = 20;
cout << *p1 << endl;
cout << p1 << endl;
cout << &p1 << endl;
return 0;
}
Thanks.
Manoj