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

Discussion on error handling of C++ .

1112


Does a derived class inherit or doesn't inherit?

1078


Is linux written in c or c++?

1031


What does n mean in c++?

1136


Explain register storage specifier.

1012


Difference between delete and free.

1067


an operation between an integer and real always yeilds a) integer result b) real result c) float result

1140


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

1004


What is the difference between a declaration and a definition?

1096


Explain 'this' pointer and what would happen if a pointer is deleted twice?

1049


How long does it take to get good at leetcode?

1162


what are function pointers?

1029


How does class accomplish data hiding in c++?

1162


What are the advantages of using a pointer?

1063


Can we distribute function templates and class templates in object libraries?

1062