Pointer and “new” and “delete”
new function allocates memory for the data type specified and returns the address of the memory allocated. If more than one location is allocated the start address is returned.
A pointer can be assigned to another pointer of the same type.
A pointer whose value is NULL does not point to anything.
delete function deallocates the memory (storage) pointed to by the pointer and returns it to the system for further use.
Example: delete P; // P is still there but the storage it points to is no longer valid.