| <<< Heap memory | Index | Displaying a memory address >>> |
Any memory declared inside a function is called a local variable::
void f()
{
int count = 0;
}
Let's try an example:
#include <cstdio>
int main()
{
int x = 4;
printf( "x is stored at %p\n", &x );
return 0;
}
| <<< Heap memory | Index | Displaying a memory address >>> |