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

Answer Posted / vinay bondade

A Pointer is not a condt pointer unless you define it in
that way,but a referrence on the contrary is a const
pointer by default and adding to this implementation it is
deferrenced automatically.

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;

1461


What is the array and initializing arrays in c++?

512


When are exception objects created?

613


How can I learn dev c++ programming?

574


Write a program which uses Command Line Arguments

640






Why can templates only be implemented in the header file?

663


What is an object in c++?

616


explain the reference variable in c++?

584


What are vectors used for in c++?

630


What is object oriented programming (oop)?

625


Define macro.

595


If horse and bird inherit virtual public from animal, do their constructors initialize the animal constructor? If pegasus inherits from both horse and bird, how does it initialize animal’s constructor?

647


Explain the isa and hasa class relationships. How would you implement each?

617


Write is a binary search tree? Write an algo and tell complexity?

599


What is the difference between #define debug 0 and #undef debug?

649