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

Is microsoft visual c++ important?

1023


What is microsoft visual c++ 2008 redistributable and do I need it?

960


What is visual c++ runtime?

987


What is cwinthread class?

1122


How do I remove microsoft visual c++ 2015 redistributable?

1007


Difference between critical section, mutex and semaphore.

1053


Where can I find microsoft visual c++?

950


What is microsoft visual c++ 2005 redistributable?

1000


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

968


What is a wizard?

2180


How to create a DLL in C++.net 2005 which we can use in VB 6.0 application ?

2180


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

1163


What are the advantages of a message map

973


Can I remove microsoft visual c++?

1022


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

1079