Naveen Said..
Difference between a Pointer and a Reference are given below.
(1) it is not necessary to intialize a pointer at the time of declaration. A pointer can be re-assigned any number of times while a reference always refere an object so it's necessary to initialize and can not be reassigned after initialization.
(2) A pointer can point to NULL while reference can never point to NULL You can't take the address of a reference like you can with pointers. For example int *s = NULL; but you can't assign NULL to a reference like int &P=NULL (incorrect).
(3) There's no "reference arithmetics" (but you can take the address of an object pointed by a
reference and do pointer arithmetics on it as in &obj + 5).
(4) A pointer needs to be dereferenced with * to access the memory location it points to, whereas a reference can be used directly. A pointer to a class/struct uses -> to access it's members.
(5) Pointer is a new variable that contain the address of another variable. So that it holds a memory address while a reference has the same memory address the item it references. Reference is a second name (aliase) of the same variable.
(6) Pointers can iterate over an array, you can use ++ to go to the next item that a pointer is pointing to, and + 4 to go to the 5th element. This is no matter what size the object is that the pointer points to.