What is the difference between Pointer and a Reference?
When you would use them?

Answer Posted / man

Reference is alias of a variable i.e. a constant pointer
which reference to a variable and can not be NULL.
You can not can get the address of ref. They are used as a
variable.

Pointers are variale that hold address of variable and can
be NULL. And can point to any number of variable.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the extraction operator and what does it do?

614


what are Access specifiers in C++ class? What are the types?

632


What is searching?

659


What is the difference between passing by reference and passing a reference?

561


Name the implicit member functions of a class.

600






How long will it take to learn programming?

593


What does std :: flush do?

692


Explain public, protected, private in c++?

567


Explain one-definition rule (odr).

649


What is public, protected, private in c++?

657


What is virtual methods?

660


What is array give example?

600


What is prototype in c++ with example?

567


What is the use of this pointer in c++?

573


Is c++ low level?

582