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 it possible to write a c++ template to check for a function's existence?

1032


How can you specify a class in C++?

1291


What is the need of a destructor?

1143


Which bitwise operator is used to check whether a particular bit is on or off?

1061


Difference between pointer to constant vs. Pointer constant

1132


What is a constructor in c++ with example?

1133


Can you pass a vector to a function?

982


What is the iunknown interface?

1129


Is java made in c++?

1066


What is a container class?

1146


What is the difference between a definition and a declaration?

1071


What is virtual base class uses?

1358


What is using namespace std in cpp?

1161


What do you mean by storage classes?

1602


Do the names of parameters have to agree in the prototype, definition, and call to the function?

1031