can u assign a reference to Null?

What is the difference between pointer and a reference?

can u assign a reference to Null?

1 Comment »

  1. Rajiv said

    A reference is an alias to an existing variable.It is like a constant pointer. A constant poninter cannot be pointed to another object(Memory) once it is initialized.

    int a =10;
    int * cont ptr = &a;
    this is equal to …..
    int& ref=a;

RSS feed for comments on this post · TrackBack URI

Leave a Comment