What is the difference between a pointer and a reference?

What is the difference between a pointer and a reference?

diff are there :
>References are aliases to variables , or we can say other name to a given variable, Even  pointer holds the address of a particular variable.
> A Reference can be thought of as a special type of pointer with certain restrictions.
> We can create the array of Pointer but its not in case of reference.
> We can use pointer to pointer but we cnt us reference to referece.
> We can assign NULL to the pointer but in refencer we can't.
> References have to be initialised at the time of declaration and cannot be changed in the code later , whereas this does'nt hold true with the pointer.

By:Umang
Date:2001-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Subjective Links

C Subjective interview questions and answers for experienced and fresher