Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the difference between reference type and pointers.

Answer Posted / manoj kumar kar

Difference 1>
Reference must point to valid objects at the time of
declaration where pointer need not point to valid objects
at the time of declaration means
int nvalue=5;
int &rnvalue; //This is invalid.
int &rnvalue=nvalue; //This is valid.

But
int *rnvalue; //This is valid.
rnvalue=&nvalue;
Difference 2>
Pointer is a variable which holds the address of another
variable.
But Reference is another name of the same variable.

Is This Answer Correct ?    18 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there any difference between int [] a and int a [] in c++?

944


Why is it necessary to use a reference in the argument to the copy constructor?

1066


what is COPY CONSTRUCTOR and what is it used for?

1022


I want to write a C++ language program that: 1. Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. The program should work for squares of all side sizes between 1 and 20.

2736


What is the full name of logo?

1064


Can we use struct in c++?

968


What is stream and its types in c++?

988


Describe new operator and delete operator?

1031


Should a constructor be public or private?

979


Explain abstraction.

1033


Describe exception handling concept with an example?

986


explain the reference variable in c++?

1016


What is an orthogonal base class in c++?

1092


What is the difference between struct and class?

1424


What's c++ used for?

1056