What are the difference between reference variables and pointers in C++?

Answer Posted / hrpynux@gmail.com

Pointers: A pointer is a variable that holds memory address of another variable. ... References : A reference variable is an alias, that is, another name for an already existing variable. A reference, like a pointer, is also implemented by storing the address of an object.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where must the declaration of a friend function appear?

638


What are the stages in the development cycle?

665


Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.

903


Refer to a name of class or function that is defined within a namespace?

718


Differentiate between late binding and early binding. What are the advantages of early binding?

672






Is it possible for the objects to read and write themselves?

739


What does flush do c++?

658


What is the auto keyword good for in c++?

720


When can I use a forward declaration?

703


What are the 3 levels of programming languages?

631


Does a derived class inherit or doesn't inherit?

717


What are guid? Why does com need guids?

668


Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);

708


how to connect with oracle 9i with server in socket program in c/c++

1954


Write a note about the virtual member function?

693