C and C++

Difference between Reference and Pointer Variable

Reference variable Pointers
References must be initialized when created Pointer Can be initialized at any time
Once reference is assigned with some object it can not be changed Pointers can point to another object at any time
One can not have NULL references The pointer can be assigned with value NULL.

Leave a comment

Your email address will not be published. Required fields are marked *