|
From: w.y. <yok...@be...> - 2003-07-31 05:37:56
|
David McKen wrote:
>
> What is this supposed to do?
> (I tried this example program)
>
> #include <stdio.h>
>
> int main()
> {
> int var;
> var = 5;
> printf("%p", &var);
> return 0;
> }
>
> Output:
> 00405020
That's the adress in memory, given in hexadecimal, on your computer
where
the variable called "var" is located at the time you ran your program.
cout << &var;
does the same thing in C++
On my machine printf gives 0022FF6C and cout gives 0x22ff6c.
|