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 differance between pass by reference and pass
by value.

Answer Posted / achal ubbott

When we use 'pass by value' method, acopy of the object is
sent to the called function. So the copy constructor of the
object gets called. But the called function cannot modify
the content of the original object.
But references of an object are like alias. When 'pass by
reference ' is used it is actually using address at the
underlying. This way the called function may modify the
contents of the original object since operations are being
performed over the same object using its address, not on
the copy.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by preprocessor in c?

948


What does == mean in texting?

1213


what is the significance of static storage class specifier?

2185


What is page thrashing?

1027


What is function and its example?

1110


Explain how can I right-justify a string?

992


Which one would you prefer - a macro or a function?

1034


I have a varargs function which accepts a float parameter?

997


What is your stream meaning?

1127


Where static variables are stored in c?

1042


Which header file is used for clrscr?

999


Explain how can you tell whether a program was compiled using c versus c++?

1054


What is the difference between volatile and const volatile?

936


How can I direct output to the printer?

1272


Explain what are run-time errors?

1038