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?



What is more efficient to pass as a parameter--a pointer or an object? Why?..

Answer / 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

More VC++ AllOther Interview Questions

How do I change visual code font?

0 Answers  


How do I reinstall microsoft visual c++?

0 Answers  


What Is InfoViewer?

1 Answers  


How do I uninstall visual c++?

0 Answers  


Is it safe to uninstall microsoft visual c++ 2008 redistributable?

0 Answers  


What is vcredist?

0 Answers  


What is ole? How do you handle drag and drop in ole?

0 Answers  


How can we use cmutex?

0 Answers  


what is the difference between the codes written in the document class and view class

1 Answers  


A file a.cpp & B.cpp are complied & linked together in VC++ file a is something like int a =100;, File B is something like extern a; main() { printf("%d",a); }what will be the output.a)100,b)linker error,c)complier error etc etc.

3 Answers   Honeywell,


Can I uninstall visual c++ 2005?

0 Answers  


Difference between getmessage, postmessage & peakmessage.

0 Answers  


Categories