C++ Blog

Tuesday, September 27, 2005

Difference between Reference and Pointer

Difference between Reference and Pointer

  1. Reference should be initialized and pointer need not be.

  2. Reference can’t point to NULL and pointer can.

  3. Reference can’t be changed to some other objects it is once initialized but pointer can be.

  4. Pointer can be incremented or decremented and subjected to any pointer arithmetic operations, but reference can’t.

0 Comments:

Post a Comment

<< Home