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

What are disadvantages of pointers?

1092


What is the difference between public and private data members?

1230


What does std :: flush do?

1189


What do you mean by const correctness?

1131


How important is c++?

1031


What are the extraction and insertion operators in c++?

1054


What is purpose of abstract class?

1126


Can we specify variable field width in a scanf() format string? If possible how?

1350


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

1112


what is multi-threading in C++?

1111


Is java the same as c++?

1035


Can comments be nested?

1080


Explain the differences between private, public and protected and give examples.

1068


What is the rule of three?

1048


What is the benefit of learning c++?

1043