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 |
What is the difference between the = and == operators?
What is a wizard?
how i can design a user interface in vc++ for getting inputs from users
What is vcredist?
What is cwinthread class? Explain its advantages.
How do I remove microsoft visual c++ 2015 redistributable?
What is the difference between the cout and cin iostream objects?
How can we allow no selection of radio button in grouped radio buttons?
What is visual c++ 2008 redistributable x64?
What is microsoft visual c++ 2008 redistributable and do I need it?
How do you specify which control is the buddy control?
How do I create an mfc application in vc++?