What is the difference between pointer and reference?

Answer Posted / treker

1. Pointer can refer NULL, refernce cannot be NULL
2. Pointer can derefernce to another address, Reference
once initialized stays that way till it dies.
3. pointer may not associate with a legitimate memory but
References should associate with certain memory.
4. pointer may not be initialized while created but
refernce has to intialized when it is created.

Is This Answer Correct ?    50 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create a DLL in C++.net 2005 which we can use in VB 6.0 application ?

1758


Difference between getmessage, postmessage & peakmessage.

611


difference between assert and verify.

592


Explain the significance of initapplication() in vc++.

656


Explain the important features of vc++?

604






Can I delete old microsoft visual c++?

552


What is visual c++ redistributable?

586


Explain some of commonly used methods provided by iunknown.

515


Can I remove microsoft visual c++?

598


What is difference between c++ and visual c++?

554


Explain pointer to the constant and constant pointer? Explain difference between them.

689


What is microsoft visual c++ 2005 redistributable?

585


What is microsoft visual c++ redistributable and do I need it?

541


How you build a project using Developer Studio?

1761


What is microsoft visual c++ 2015 redistributable?

597