top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is difference between pointer and reference? [CLOSED]

0 votes
242 views
What is difference between pointer and reference? [CLOSED]
posted Jul 11, 2016 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
Both pointers and references let  you refer to other objects indirectly. You can't take the address of a reference but you can with pointers. if you have a  variable whose purpose is to refer to another object, but it is possible  that there might not be an object to refer to, we have to make the variable a pointer, because then you can set it to "null".

...