#include using namespace std; int main() { float f; // variable float *myPointerF; // pointer - only stores a memory address f = 60; // myPointerF = &f; cout << "&f = " << &f << endl; cout << "f = " << f << endl; cout << "myPointerF = " << myPointerF << endl; cout << "*myPointerF = " << *myPointerF << endl; int *i, *p; i = new int; *i = 200; cout << "*i = " << *i << endl; delete i; // i is now a dangling pointer i = NULL; // not dangling any more - now its NULL cout << "*i = " << *i << endl; p = new int; p=i; // creates a memory leak cout << "i = " << i << endl; *i = 30; cout << "*i = " << *i << endl; return 0; }