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 more efficient to pass as a parameter--a pointer or
an object? Why?

Answer Posted / amar

Passing a parameter by pointer is more efficient than
passing as object. When a parameter is passed as object
another of copy of the object is created on stack hence it
has two overheads, 1. it takes cpu cycle while creating
copy object 2. it takes memory on stack.

Passing the parameter through pointer could lead to a
situation where function can acciedently change the value
of the object.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In which Way invoke context-sensitive help inside the editor?

2146


What is visual c++ 2008 redistributable x64?

969


Where can I find microsoft visual c++?

942


Is visual c++ still used?

943


What is iunknown? Explain some of commonly used methods provided by iunknown.

1027


What is microsoft visual c++ 2005 redistributable?

993


What is difference between c++ and vc++?

1154


Explain the advantages of cwinthread class.

927


What is the Use of the Developer Studio Editor?

2545


Explain the significance of initapplication() in vc++.

1071


Do I need microsoft visual c++?

961


Do I need microsoft visual c++ 2005 redistributable on my computer?

1068


Is it ok to uninstall microsoft visual c++?

1035


How do I create an mfc application in vc++?

989


What is visual c++ runtime error?

1133